UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: elichvatal on July 14, 2015, 12:53:36 am

Title: EE Help
Post by: elichvatal on July 14, 2015, 12:53:36 am
So i was planning on  making a map that is going to be built in a ridiculous amount (Possible 1 hour and 15 minutes)  of time so i wanted to gather some info  before i start the timer. so how would i make a simple ee where you just find 3 perk bottles and then you get all perks. just something really simple to add some sort of challenge or objective to the map. Any help would be awesome, thanks. :nyan: :nyan: :nyan: :nyan: :nyan: :nyan: :nyan:
Title: Re: EE Help
Post by: DidUknowiPwn on July 14, 2015, 05:13:23 am
Put a script_model in radiant give it a targetname of something like "ee_cookies"
In a script (load this in your map.gsc from around the main call) do this:
Code Snippet
Plaintext
init()
{
level.ee_cookies_shot = 0;
bottles = GetEntArray("ee_cookies", "targetname");
array_thread(bottles, ::dankMemes);
}
dankMemes()
{
self SetCanDamage(true);
self waittill("damage");
IPrintLnBold("I've been shot and I can't get up!");
level.ee_cookies_shot++;
if(level.ee_cookies_shot == 3) //dankest memes
doOtherDankness();
}
doOtherDankness()
{
players = get_players();
for(i = 0;i < players.size; i++)
players[i] setDankPerks();
}
setDankPerks()
{
perk = [];
perk[0] = "specialty_armorvest"; //iirc this is juggs perk name
perk[1] = "specialty_dank"; //not actual perk name
for(i = 0; i < perk.size; i++)
{
player SetPerk(perk[i]);
player perk_hud_create( perk );
player.stats["perks"]++;
player thread perk_think( perk );
}
}
I didn't space it out because I'm lazy.
Title: Re: EE Help
Post by: arceus on July 14, 2015, 12:50:44 pm
Code Snippet
Plaintext
init()
{
level.ee_cookies_shot = 0;
bottles = GetEntArray("ee_cookies", "targetname");
array_thread(bottles, ::dankMemes);
}

dankMemes()
{
self SetCanDamage(true);
self waittill("damage");
IPrintLnBold("I've been shot and I can't get up!");
level.ee_cookies_shot++;

if(level.ee_cookies_shot == 3) //dankest memes
doOtherDankness();
}

doOtherDankness()
{
players = get_players();
for(i = 0;i < players.size; i++)
players[i] setDankPerks();
}

setDankPerks()
{
perk = [];
perk[0] = "specialty_armorvest"; //iirc this is juggs perk name
perk[1] = "specialty_dank"; //not actual perk name
for(i = 0; i < perk.size; i++)
{
player SetPerk(perk[i]);
player maps\_zombiemode_perks::perk_hud_create( perk );
player.stats["perks"]++;
player thread maps\_zombiemode_perks::perk_think( perk );
}
}

i couldn't help myself :poker:
Title: Re: EE Help
Post by: elichvatal on July 16, 2015, 11:05:42 pm
Thanks tested and works :D Edit: whenever i launch i says unintilized variable 'player' any help
Title: Re: EE Help
Post by: Centric on July 17, 2015, 05:38:57 am
Thanks tested and works :D Edit: whenever i launch i says unintilized variable 'player' any help

In other words... It didn't work?
Title: Re: EE Help
Post by: DidUknowiPwn on July 17, 2015, 06:02:48 am
Thanks tested and works :D Edit: whenever i launch i says unintilized variable 'player' any help
Replace player in setDankPerks with self woops  :derp:
Title: Re: EE Help
Post by: ProGamerzFTW on July 17, 2015, 06:19:29 am
Thanks tested and works :D Edit: whenever i launch i says unintilized variable 'player' any help

Did you say it works before you even tested it?  :poker:
Title: Re: EE Help
Post by: liamsa669 on July 17, 2015, 12:53:36 pm
lol that moment when DidUknowiPwn makes a mistake
Title: Re: EE Help
Post by: DidUknowiPwn on July 17, 2015, 02:41:29 pm
lol that moment when DidUknowiPwn makes a mistake
Check my livestream i did last night made plenty of mistakes ;)

You can't be perfect :D
Title: Re: EE Help
Post by: steviewonder87 on July 17, 2015, 04:32:10 pm
So i was planning on  making a map that is going to be built in a ridiculous amount (Possible 1 hour and 15 minutes) of time
Why?? :-\
Title: Re: EE Help
Post by: MakeCents on July 17, 2015, 05:00:24 pm
Why?? :-\

I can think of plenty of reasons why:

 - We have about an hour and 15 minutes before Mom comes home.
 - The cops will be here in about an hour and 15 minutes
 - School don't start for another hour and 15 minutes
 - I have two 45 minute study halls, but I have to study (go to bathroom) for about 15 minutes
 - I've found value in speed mapping over the need for quality
 - Cause "Ain't nobody got time for that".
 - I get 15 minutes of pc time a month, so this will actually take me 5 months.
 - Everybody's doing it.
 - Cause it's Friday, and I ain't got shit to do. (for an hour and 15 minutes)
 - I just said and hour and 15 minutes to start some shit with stevie
 - This message will self destruct, in an hour and 15 minutes.


 :D Just playing
Title: Re: EE Help
Post by: HitmanVere on July 17, 2015, 05:29:52 pm
I can think of plenty of reasons why:

 - We have about an hour and 15 minutes before Mom comes home.
 - The cops will be here in about an hour and 15 minutes
 - School don't start for another hour and 15 minutes
 - I have two 45 minute study halls, but I have to study (go to bathroom) for about 15 minutes
 - I've found value in speed mapping over the need for quality
 - Cause "Ain't nobody got time for that".
 - I get 15 minutes of pc time a month, so this will actually take me 5 months.
 - Everybody's doing it.
 - Cause it's Friday, and I ain't got shit to do. (for an hour and 15 minutes)
 - I just said and hour and 15 minutes to start some shit with stevie
 - This message will self destruct, in an hour and 15 minutes.


 :D Just playing

(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Ff7FdEdG.jpg&hash=f1e728c932ad9abde85fe74a49bca9c744cc9589)
Title: Re: EE Help
Post by: liamsa669 on July 17, 2015, 07:52:43 pm
Check my livestream i did last night made plenty of mistakes ;)

You can't be perfect :D
You cant be perfect... If i tried, i can -_-
Title: Re: EE Help
Post by: Centric on July 18, 2015, 05:56:48 am
You cant be perfect... If i tried, i can -_-

You must not try to hard considering you've deleted your account multiple times. Not so perfect.
Title: Re: EE Help
Post by: liamsa669 on July 19, 2015, 12:52:50 am
You must not try to hard considering you've deleted your account multiple times. Not so perfect.
:troll: ask my teachers -_- if u think thats bad... they can supply you with worse
Title: Re: EE Help
Post by: GAM3VIDZ on July 19, 2015, 08:20:38 pm
Put a script_model in radiant give it a targetname of something like "ee_cookies"
In a script (load this in your map.gsc from around the main call) do this:

Looks like I need to start talking to you again you know your scripting :) I realized you were my friends list on WAW was wondering why your name looked familiar lol
Title: Re: EE Help
Post by: elichvatal on July 20, 2015, 12:39:07 pm
says uninitalized variable player Again i was think of replacing all 'player' with 'self' but that wouldent make any sense.
And decided not to do the challenge map :D
Title: Re: EE Help
Post by: MakeCents on July 20, 2015, 01:03:42 pm
says uninitalized variable player Again i was think of replacing all 'player' with 'self' but that wouldent make any sense.
And decided not to do the challenge map :D

Your gonna have to either learn how to trouble shoot little things like that yourself or give more information. developer 1 in console, then start the game. find the line for the error and give more information other than "says uninitalized variable player Again". Include your current updated code or a screen shot or something. Your gonna find out that the error is simply you are using player somewhere and haven't told the script what a player is yet. And the previous fix for that error was that you wanted self because self was the player, because the function was thread on the player. Probably a similar issue. If you are using Dukips script then it should say player in it anymore anywhere. players and players yes, but not player.
Title: Re: EE Help
Post by: Harry Bo21 on July 20, 2015, 08:36:41 pm
Your gonna have to either learn how to trouble shoot little things like that yourself or give more information. developer 1 in console, then start the game. find the line for the error and give more information other than "says uninitalized variable player Again". Include your current updated code or a screen shot or something. Your gonna find out that the error is simply you are using player somewhere and haven't told the script what a player is yet. And the previous fix for that error was that you wanted self because self was the player, because the function was thread on the player. Probably a similar issue. If you are using Dukips script then it should say player in it anymore anywhere. players and players yes, but not player.
Hes right, this is a common issue around here lately. We need more info to help, and its down to the user to get that info

Just "not doing" something coz it wont work isnt gonna help you, your just gonna run into another similar issue later