Page 2 of 3
Posted: Sun Sep 11, 2005 10:49 am
by bdbodger
local.trigCR = spawn trigger_multiple
local.trigCR.origin = ( -990 -3010 -57 )
local.trigCR setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trigCR setthread Peace_room
local.trigCR message "***!You are now in CRAZY PEACE ROOM for 30 seconds!***"
local.trigCR wait 0
local.trigCR delay 0
Peace_room:
//self waittill trigger // You don't need this this thread is run by setthread
local.player = parm.other
if (local.player.isTrigger1==1) This line is for makeing only one thread run for this player but you didn't set it
end
local.player.isTrigger1 = 1 // ok now it is set you have to unset it too
//local.player = parm.other // You already grabed the parm.other value you don't need to do it again
local.player tele ( -2120 -3005 -120 )
//wait 30 // ???? is this what you are thinking of it will only delay the flicker from starting
local.counter = 30
///parm.other stopwatch 30 // parm.other can change when a trigger is triggered and be another player we want same player this thread is running for
local.player stopwatch 30 // thats better
while(local.counter != 0 && IsAlive local.player)
{
local.counter -= 1 // you can use local.counter-- too
wait .25
local.player light 0 1 0 200
wait .25
local.player light 0 0 1 200
wait .25
local.player light 1 0 0 200
wait .25
}
local.player takeall
wait 5
local.player stufftext "say Oh no, i'm getting crazy..!"
wait 25
local.player light_off // don't want this guy to keep glowing
local.player respawn
local.player.isTrigger1 = 0 // ok now unset it so player can trigger it again
end
Posted: Sun Sep 11, 2005 11:04 am
by Barttje
I'm sorry to say this, but it still doesn't work
Code: Select all
level waittill prespawn
local.trigCR = spawn trigger_multiple
local.trigCR.origin = ( -990 -3010 -57 )
local.trigCR setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trigCR setthread Peace_room
local.trigCR message "***!You are now in CRAZY PEACE ROOM for 30 seconds!***"
local.trigCR wait 0
local.trigCR delay 0
level waittill spawn
Peace_room:
//self waittill trigger // You don't need this this thread is run by setthread
local.player = parm.other
if (local.player.isTrigger1==1) This line is for makeing only one thread run for this player but you didn't set it
end
local.player.isTrigger1 = 1 // ok now it is set you have to unset it too
//local.player = parm.other // You already grabed the parm.other value you don't need to do it again
local.player tele ( -2120 -3005 -120 )
//wait 30 // ???? is this what you are thinking of it will only delay the flicker from starting
local.counter = 30
///parm.other stopwatch 30 // parm.other can change when a trigger is triggered and be another player we want same player this thread is running for
local.player stopwatch 30 // thats better
while(local.counter != 0 && IsAlive local.player)
{
local.counter -= 1 // you can use local.counter-- too
wait .25
local.player light 0 1 0 200
wait .25
local.player light 0 0 1 200
wait .25
local.player light 1 0 0 200
wait .25
}
local.player takeall
wait 5
local.player stufftext "say Oh no, i'm getting crazy..!"
wait 25
local.player light_off // don't want this guy to keep glowing
local.player respawn
local.player.isTrigger1 = 0 // ok now unset it so player can trigger it again
end
by this script the map doesn't load my script (all of my script)
and about the console:

Posted: Sun Sep 11, 2005 11:33 am
by bdbodger
level waittill spawn
end // end of the main thread the peace_room thread is run by setthread guess I missed that
Peace_room:
also I missed some comment brackets
if (local.player.isTrigger1==1) // This line is for makeing only one thread run for this player but you didn't set it
and
local.player light_off
should have been
local.player lightoff
Posted: Sun Sep 11, 2005 12:02 pm
by GiffE1118
Bartjerambo, the last question u had you for got to put the end after level waittill spawn
if you dont put that end when the map loads it will keep on loading all the threads untill there is an end
i think console would show the non commented out line. when people say what does console give you they as for you to look through the logfile and post anything thats relavent to the topic. console tells exactly whats wrong. and where its wrong.
i didnt know there was a cmd called lightoff. i always just made their light 0 0 0 0.
Posted: Sun Sep 11, 2005 2:09 pm
by Barttje
i have an end afther Waittill spawn, but i have short the exemple in.
here is the whole exemple as you wish
Code: Select all
level waittill prespawn
local.trigCR = spawn trigger_multiple
local.trigCR.origin = ( -990 -3010 -57 )
local.trigCR setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trigCR setthread Peace_room
local.trigCR message "***!You are now in CRAZY PEACE ROOM for 30 seconds!***"
local.trigCR wait 0
local.trigCR delay 0
//<--- i don't know if i must place here and end... :?
level waittill spawn
end
Peace_room:
//self waittill trigger // You don't need this this thread is run by setthread
local.player = parm.other
if (local.player.isTrigger1==1) This line is for makeing only one thread run for this player but you didn't set it
end
local.player.isTrigger1 = 1 // ok now it is set you have to unset it too
//local.player = parm.other // You already grabed the parm.other value you don't need to do it again
local.player tele ( -2120 -3005 -120 )
//wait 30 // ???? is this what you are thinking of it will only delay the flicker from starting
local.counter = 30
///parm.other stopwatch 30 // parm.other can change when a trigger is triggered and be another player we want same player this thread is running for
local.player stopwatch 30 // thats better
while(local.counter != 0 && IsAlive local.player)
{
local.counter -= 1 // you can use local.counter-- too
wait .25
local.player light 0 1 0 200
wait .25
local.player light 0 0 1 200
wait .25
local.player light 1 0 0 200
wait .25
}
local.player takeall
wait 5
local.player stufftext "say Oh no, i'm getting crazy..!"
wait 25
local.player lightoff // don't want this guy to keep glowing
local.player respawn
local.player.isTrigger1 = 0 // ok now unset it so player can trigger it again
end
Posted: Sun Sep 11, 2005 3:50 pm
by bdbodger
make all the changes I said add the comment lines // to this line
if (local.player.isTrigger1==1) // This line is for makeing only one thread run for this player but you didn't set it
you should know that those lines // mean everything after them on that line is a comment in the script for you to read and please turn on your log file and read it you can't expect us to have to debug every script you do .
Posted: Sun Sep 11, 2005 5:18 pm
by Barttje
i know that....
but i'm asking if i have to set "end"afther Waittil prespawn, like:
---------------------------------------------------------------------------
level waittill prespawn
local.sandbank = spawn script_object
local.sandbank model "static/sandbag_link_main.tik"
local.sandbank.origin = ( -2200 -2890 -145 )
local.sandbank.angles = ( 0 90 0 )
local.sandbank hide
local.sandbank solid
end
---------------------------------------------------------------------------
(My trigger script still doesn't work can you see whats wrong

)
---------------------------------------------------------------------------
Posted: Sun Sep 11, 2005 9:39 pm
by lizardkid
end is used to "end" threads. anything with : after it (main: ) is a thread, or can be. so lets say you wanted a thread that says "I'm a thread." on the middle of your screen.
Code: Select all
newThread:
centerprint "I'm a thread."
end
so you need your end to tell it to stop running that thread.
Posted: Mon Sep 12, 2005 2:38 am
by bdbodger
most scripts put a thread name at the start of the script called main but if you run a script but do not call a thread or in a level script like this it starts at the top of the script and reads until it hits an end
main:
level waittill prespawn
local.trigCR = spawn trigger_multiple
local.trigCR.origin = ( -990 -3010 -57 )
local.trigCR setsize ( -10 -10 -10 ) ( 10 10 10 )
local.trigCR setthread Peace_room // tells the trigger to run the thread when it is triggered
local.trigCR message "***!You are now in CRAZY PEACE ROOM for 30 seconds!***"
local.trigCR wait 0
local.trigCR delay 0
level waittill spawn
end // end of the first thread or fist end in the script
Peace_room: // first thread after the start of the script or main thread
So you see that the Peace_room thread is started by the trigger and you see where the main thread stops
Posted: Mon Sep 12, 2005 3:39 pm
by Barttje
Posted: Tue Sep 13, 2005 8:25 am
by bdbodger
What error did you get in the log file qconsole.log ?
Posted: Tue Sep 13, 2005 3:16 pm
by Barttje
None error....
Posted: Wed Sep 14, 2005 3:43 am
by Green Beret
Yea, it all correct, maybe he has another conflicting .scr or maybe wrong folder?
Posted: Wed Sep 14, 2005 4:22 am
by lizardkid
i cant see anything wrong with it besides convention. what are the errors? is it named correctly?
to get your errors, open MOH, type logfile 2, close MOH, open it and load your map, let it run for a few seconds, then close MOH. take the file C:\Program Files\EA Games\MOHAA\main\qconsole.log and copy/paste it here.
*cringe i hate telling people to do that, such a waste of forum space.
Posted: Wed Sep 14, 2005 2:50 pm
by Barttje
i don't have any log file in my main.....