Elevators are causing headaches...

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
chaoscentral
Posts: 677
Joined: Sun Feb 27, 2005 4:32 pm
Location: Revere, MA
Contact:

Elevators are causing headaches...

Post by chaoscentral »

can someone please help me... I started making levels again... and I'm trying to make this elevator... So far it works on the way up, and the way down... but if you try to go back up after going down... it just goes down another 400 units... its acting as if it is not "up" Now, I have this as a script.
Spoiler:
Also, the variable "up" is a Map Scope variable. I define it as a 1 in an OPEN script, to signify that it is indeed down. So It works on the first time Up, not the second time
User avatar
chaoscentral
Posts: 677
Joined: Sun Feb 27, 2005 4:32 pm
Location: Revere, MA
Contact:

Post by chaoscentral »

some one? this is the only thing delaying my mapping....
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

You need an else between your two if statements. Otherwise, after the first one sets up to 1, the second if block sees that and executes as well:

Code: Select all

if(up >= 2)
    ...
else if(up <= 1)
    ...
User avatar
chaoscentral
Posts: 677
Joined: Sun Feb 27, 2005 4:32 pm
Location: Revere, MA
Contact:

Post by chaoscentral »

thank you, it worked like a charm
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Post by David Ferstat »

Next time, please wait more than a few hours before bumping your threads. We're not here 24 hours a day, nor are we here just for your convenience.
User avatar
chaoscentral
Posts: 677
Joined: Sun Feb 27, 2005 4:32 pm
Location: Revere, MA
Contact:

Post by chaoscentral »

ok, ok, its just I was in a hurry. Also, I'm well aware of that.
Locked

Return to “Editing (Archive)”