I think it does not like the targetname because "switch" is a command word used in scripting. So, change the targetname to "rotatingbar_switch" in the map and recompile. Also, change the targetnames in the script thread.
To make the bar automattic, just take out the second trigger line and replace it with "wait 5"--five seconds is not very long. If you want the whole thing to take 11 seconds, you'll have to insert that "time" line.
The "waitmove" makes the thread stop running untill the bar has moved. If you use just "move" the bar will start moving and the thread will continue to the "waittill trigger" line--we don't want that because the player might hit use again before the bar is up all the way!
BTW, you are doing great--at least you know how to find script errors in the console!
rotating a brush
Moderator: Moderators
i meant that the bar doesnt move it rotates,but it turns out that wasnt the problemThe "waitmove" makes the thread stop running untill the bar has moved
i tried the rotatexupto -60 and it made a -60 from the horizontal (120 in total) so when i tried rotatexup 0 it came back 2 noramal,i guess thats y rotatexdown didnt seem 2 work cause it was rotating the bar 2 an angle of 60 which was already done by rotatexup
the switch worked fine after renaming ,i guess u were right.but shouldnt it make any animations?cause when i click use it looks the same but the bar moves. (isnt thats y the switch is in the animation tab in mohradient?)I think it does not like the targetname because "switch" is a command word used in scripting. So, change the targetname to "rotatingbar_switch" in the map and recompile. Also, change the targetnames in the script thread.
ive had some previous experience in repairing simple scripts and maps without spawn points and stuff like that ,and thats how i came 2 start mappingBTW, you are doing fine--at least you know how to find script errors in the console!
thank u alot
rotateXupto
I think part of the problem is that "rotateXupto" and "rotateXup" are not the same thing.
I tried this and it worked fine:
I tried this and it worked fine:
Code: Select all
main:
level waittill prespawn
$rotatingbar time 3
thread rotatingbar_mover
level waittill spawn
end
rotatingbar_mover:
$rotatingbar_trigger waittill trigger
$rotatingbar_switch anim on
$rotatingbar_switch playsound alarm_switch
wait 1
$rotatingbar rotateXup 60
$rotatingbar waitmove
wait 5
$rotatingbar rotateXdown 60
$rotatingbar waitmove
wait 1
$rotatingbar_switch anim off
$rotatingbar_switch playsound alarm_switch
goto rotatingbar_mover
end

