Page 2 of 3
Posted: Sun Jan 02, 2005 1:57 am
by Grassy
Howdy,
Firstly I would put the lines that call the threads _below_ level waittill spawn. Only things that need precaching should be above prespawn.
Secondly, your movement thread.
Code: Select all
brushloop2:
$brush2 time 4
$brush2 movenorth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movenorth 200
move
wait 3
goto brushloop2
end
In the above you have two move commands here "movenorth" & "move" on it's own. Also to keep track of the moving object you need something like a "waitmove"
Code: Select all
brushloop2:
//only need to specify an objects speed once if not changing it
$brush2 time 4
while (1)
{
$brush2 movenorth 200
$brush2 waitmove //wait till move is done
wait 3
$brush2 movesouth 200
$brush4 waitmove
wait 3
$brush2 movesouth 200
$brush2 waitmove
wait 3
$brush2 movenorth 200
$brush2 waitmove
wait 3
}
end
Another way to keep your script more compact is to re-use a thread;
I understand in your case the objects are moving in opposit directions but if you wanted more than one object moving the same way you could do it this way.
$brush thread movebrush
$brush2 thread movebrush
Code: Select all
movebrush:
//only need to specify an objects speed once if not changing it
self time 4
while (self)
{
self movenorth 200
self waitmove //wait till move is done
wait 3
self movesouth 200
self waitmove
wait 3
self movesouth 200
self waitmove
wait 3
self movenorth 200
self waitmove
wait 3
}
end
Posted: Sun Jan 02, 2005 2:53 am
by Cheetohs
Alright thanks guys, Lizard your the greatest... Grassy... you too man. Ill go test it out quick. Im down to only a few strands of hair.
Posted: Sun Jan 02, 2005 4:09 am
by Cheetohs
Omg... this is making me angry! Ive tried everything i could possibly try that i know to make ONE of these things work.... but alas, i cant. I quadruple checked everything over and over, looked for spelling and everything.... just not cut out for this!
I switched all the names to lowercase letters in both radiant and in the .scr, so that shouldn't be the problem. If anyone is willing, i could send them the .pk3 of the .map and .scr.... gah.
Code: Select all
// Bored
// ARCHITECTURE: Cheetohs
// SCRIPTING: Cheetohs
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Made By:"
setcvar "g_obj_alliedtext2" "Cheetohs"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" "Or was"
setcvar "g_obj_axistext3" "It?"
setcvar "g_scoreboardpic" "none"
level waitTill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/bored.scr
level waittill spawn
thread goallight1
thread brushloop2
thread brushloop
end
goallight1:
level.doTheLight = 1
while(level.doTheLight == 1)
{
$goallight1 hide
$goaltrig waittil trigger
$goallight1 show
wait 3
$goallight1 hide
}
end
brushloop2:
$brush2 time 4
$brush2 movenorth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movenorth 200
move
wait 3
goto brushloop2
end
brushloop:
$brush time 4
$brush movesouth 200
move
wait 3
$brush time 4
$brush movenorth 200
move
wait 3
$brush time 4
$brush movenorth 200
move
wait 3
$brush time 4
$brush movesouth 200
move
wait 3
goto brushloop
end
Posted: Sun Jan 02, 2005 4:29 am
by lizardkid
send it here,
porion@bresnan.net, i'd be happy to look it over

Posted: Sun Jan 02, 2005 8:27 am
by bdbodger
You can try putting some debug lines in your script like
$goaltrig waittil trigger
iprintln "I was triggered"
$goallight1 show
also if you make a script model and give it the model fx/corona_red.tik and put it where the light is you can hide and show it it may show the red light better . When you do this
$brush2 time 4
$brush2 movenorth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
the brush starts moveing north but then starts to move south too so it is actually fighting it's self to move maybe even with the wait3 try doing it this way so it does one movement then the other also I don't think you need to keep useing time4 I think you just need to do that once unless you want to change it . I think anyway . I don't like goto either I would but it in a while(1) loop .
$brush2 time 4
$brush2 movenorth 200
waitmove
wait 3
$brush2 movesouth 200
Posted: Sun Jan 02, 2005 11:52 am
by jv_map
Sorry if this has been said before, I just looked over the thread really quickly and to me it seems that
move
must be
$brush2 move

Posted: Sun Jan 02, 2005 1:49 pm
by Grassy
OMG. did anyone actually read me post ???

Posted: Sun Jan 02, 2005 1:57 pm
by wacko
isnt it 'waittill' (with 2 l's)? in goallight1, there is a 'waittil'

Posted: Sun Jan 02, 2005 2:37 pm
by Green Beret
here ya go.
Code: Select all
// Bored
// ARCHITECTURE: Cheetohs
// SCRIPTING: Cheetohs
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Made By:"
setcvar "g_obj_alliedtext2" "Cheetohs"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" "Or was"
setcvar "g_obj_axistext3" "It?"
setcvar "g_scoreboardpic" "none"
level waitTill prespawn
thread goallight1//call after prespawn
thread brushloop2
thread brushloop
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/bored.scr
level waittill spawn
end
//goal_light------------------------------------------------------------------------
goallight1:
level.doTheLight = 1
while(level.doTheLight == 1)
{
$goallight1 hide
$goaltrig waittil trigger
$goallight1 show
wait 3
$goallight1 hide
}
end
//brusgloop2-----------------------------------------------------------------------
brushloop2:
$brush2 time 4
$brush2 movenorth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movesouth 200
move
wait 3
$brush2 time 4
$brush2 movenorth 200
move
wait 3
goto brushloop2
end
//brushloop1-----------------------------------------------------------------------
brushloop:
$brush time 4
$brush movesouth 200
move
wait 3
$brush time 4
$brush movenorth 200
move
wait 3
$brush time 4
$brush movenorth 200
move
wait 3
$brush time 4
$brush movesouth 200
move
wait 3
goto brushloop
end
this works for me,i did a quick test

Posted: Sun Jan 02, 2005 5:00 pm
by Cheetohs
Arg. Even that .scr didnt work...meaning the problem has got to be in MOHRadiant with my map?
Oh, and in that script Green... shouldnt:
be
kinda like wacko said....
Probably a stupid question, but what do the dollar signs do? and why use theM?
Posted: Sun Jan 02, 2005 5:16 pm
by Green Beret
yea,i just copied and pasted,didnt notice it.
but yea,add it with two l's
waittill
so is it the goal light that dont work?
Posted: Sun Jan 02, 2005 5:22 pm
by Cheetohs
neither. same thing. Nets don't move and the goal light is on from the start.
Posted: Sun Jan 02, 2005 6:10 pm
by Green Beret
well,when i took out the goallight script,the other worked

Posted: Sun Jan 02, 2005 6:56 pm
by Green Beret
try this for the gaol light
(make sure you use a script_model. model=fx/dummy.tik
Code: Select all
// Bored
// ARCHITECTURE: Cheetohs
// SCRIPTING: Cheetohs
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Made By:"
setcvar "g_obj_alliedtext2" "Cheetohs"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" "Or was"
setcvar "g_obj_axistext3" "It?"
setcvar "g_scoreboardpic" "none"
level waitTill prespawn
thread goallight_on
thread brushloop
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/bored.scr
level waittill spawn
$brush bind $light
$light bind $goallight1
end
//goallight-----------------------------------------------------------------------
goallight_on:
$goaltrig waittill trigger
$light light 1 0 0 706
wait 3
$light light 0 0 0 706
goto goallight_on
//brushloop1-----------------------------------------------------------------------
brushloop:
$brush movesouth 200
move
wait 3
$brush movenorth 200
move
wait 3
$brush movenorth 200
move
wait 3
$brush movesouth 200
move
wait 3
goto brushloop
end
i couldnt get the brush's to move,i think its because the trigger is in the middle of the brush's.im not sure im still testing it different ways,but this goal light does work
Posted: Sun Jan 02, 2005 8:32 pm
by lizardkid
the $ sign is the entity operator, it means "i'm talking about an entity wit hthis name." as opposed to a class like local or level which mean "I'm talking about a variable with this name."