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

An another elevator question

broken avatar :(
Created 12 years ago
by Ege115
0 Members and 1 Guest are viewing this topic.
2,139 views
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Hello everybody once again!

I have an elevator in my map were I am try to make as bug free as possible.

And my elevator can only be used once right now, but I want it able to be used all the time. But how do I do that?
I tried to add
Code Snippet
Plaintext
return;

At the end of the elevator script, but it gave me an "uknown function error". But how can that be an unknown function? I have seen many scripts that uses that function.

Are there other solutions to make the elevator being able to be used all the time?

Thanks in advance  :)
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 6 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter Elite
My Groups
More
×
YaPh1l's Groups
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
return is not a function, it's a statement. And therefore only valid within the context of a function. And it will not help you at all to make stuff be usable multiple times. Look up while (and possibly for) loops.

- Phil.
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
It is a statement? Sorry didn't know that.

I know that I have seen loop/while functions before but I don't remember from which script I saw it. But I am sorry to bother Phil but could you show me an example of an loop/while function?
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 7 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Coding examples that work in the same syntax as GSC can be found anywhere on the internet. Just look up C++/C# examples of any loops/statements you want and you will find your answer. Could also look in almost any script included in zombiemode.
Last Edit: January 12, 2014, 03:19:54 pm by SajeOne
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Alright, thank you @YaPhil and @Sajeone!

I think I found something in the on of the zombiemode scripts.
I found

Code Snippet
Plaintext
while(1)

And I guess that it means where the loop will start, maybe it is not, I don't know.
But if I am correct, do I just have to add that line at where I want the script to loop?
Or is it more than that? (I am noob at scripting at the moment)
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 2 years ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Okey I have now learned how to make functions to loop, so I don't know which one of you two who will have the best answer here hmm. YaPhil or Sajeone?..... hmm decisions decisions

 
Loading ...