a variable for setsize?
Posted: Tue Nov 01, 2005 11:36 pm
I've been trying to have the setsize of a trigger change depending on the out come of a switch. I have a thread spawning the trigger and it calls to the thread "get_origin" for a random origin, by the use of the switch. I was hoping to have a different set size for different origins.
I've tried various ways but it hasn't work. I was trying this type of set up where level.size1 and level.size2 are defined differently in the switch.
get_origin:
switch (randomint(5)+1)
{
case 1:
level.origin = ( 200 500 10 )
level.size1 = "1 -1 -1"
level.size2 = "500 300 180"
break
...(same thing repeated for diff cases)
}
end level.origin //sent back to the thread asking for origin
//---------------------------------- skipping to trigger
spawn trigger_mulitple "targetname" "hill"
$hill.origin = thread get_origin
$hill setsize (level.size1) (level.size2)
$hill setthread trigger
I've tried various ways but it hasn't work. I was trying this type of set up where level.size1 and level.size2 are defined differently in the switch.
get_origin:
switch (randomint(5)+1)
{
case 1:
level.origin = ( 200 500 10 )
level.size1 = "1 -1 -1"
level.size2 = "500 300 180"
break
...(same thing repeated for diff cases)
}
end level.origin //sent back to the thread asking for origin
//---------------------------------- skipping to trigger
spawn trigger_mulitple "targetname" "hill"
$hill.origin = thread get_origin
$hill setsize (level.size1) (level.size2)
$hill setthread trigger