UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Woo's elevator charge for ride's help

broken avatar :(
Created 9 years ago
by jtljac
0 Members and 1 Guest are viewing this topic.
2,534 views
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 22 July 2015
Last active: 2 years ago
Posts
20
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
jtljac's Groups
jtljac's Contact & Social Linksjtljac
I am making a map which features woo's elevator but I don't seem to be able to make it charge the users for the ride through the changes to the script I made tried to make, I am unfortunately not at all any good at scripting so I cannot fix this error myself. Here is the link to the script (https://ugx-mods.com/forum/index.php?topic=1927.0) can someone edit it and post a link to the new script?
Thank you.
Marked as best answer by jtljac 9 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 4 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
its actually already implemented in the script. all you need to do is remove the // in front the lines from these lines
Code Snippet
Plaintext
 if( IsDefined(self.zombie_cost) )
           if( player.score >= self.zombie_cost )
          player maps\_zombiemode_score::minus_to_player_score( self.zombie_cost );
        else
          continue;
and then on the entity in that has the targetname of "woo_elevator" give it the kvp zombie_cost with the value of how much you want it too cost
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 22 July 2015
Last active: 2 years ago
Posts
20
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
jtljac's Groups
jtljac's Contact & Social Linksjtljac
I tried that but if you look at the code there is a lot missing like how there are no curly brackets around the condition statements. Although when I last tried it with the code I modified I only tried to give the buttons the KVP so I will try giving the entity titled "Woos elevator" the zombie_zost KVP and post the results and my modified code.
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 22 July 2015
Last active: 2 years ago
Posts
20
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
jtljac's Groups
jtljac's Contact & Social Linksjtljac
Ok, I will try without.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 4 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
I tried that but if you look at the code there is a lot missing like how there are no curly brackets around the condition statements. Although when I last tried it with the code I modified I only tried to give the buttons the KVP so I will try giving the entity titled "Woos elevator" the zombie_zost KVP and post the results and my modified code.

like nate said any condition statement can have one line directly under it that will be effected by the condition without the need for brackets. so any for loop, while loop, and if else statement that will only affect one line doesnt require brackets surrounding the affected code

Ok, I will try without.
and if you are concerned about it then add the brackets around the lines
Last Edit: May 10, 2016, 08:07:11 pm by buttkicker845
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 22 July 2015
Last active: 2 years ago
Posts
20
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
jtljac's Groups
jtljac's Contact & Social Linksjtljac
Ok, the code price shows up on the button but now when I interact with it my game crashes with "unhandled exception caught"
The mod I'm testing it with only contains the woo's elevator script without any other scripts present, it only has some fx and sounds removed.

Never mind, I fixed it, the string of code
Code Snippet
Plaintext
array_thread(player, ::book_fake_pos);
was what caused the crashes.
Thank you both of you for your help.

 
Loading ...