In my case the mapper would add a prefab of a helicopter made from script models and then execute the global script from the level script but in order for some certain things to happen i need to know the angles of the helicopter. Does anyone know the command to get the angles on a script object?
Help needed with helicopter global script
Moderator: Moderators
Help needed with helicopter global script
I am trying to make a global script for a driveable helicopter in a map that players could use but i dont no how to get the script models angles.
In my case the mapper would add a prefab of a helicopter made from script models and then execute the global script from the level script but in order for some certain things to happen i need to know the angles of the helicopter. Does anyone know the command to get the angles on a script object?
In my case the mapper would add a prefab of a helicopter made from script models and then execute the global script from the level script but in order for some certain things to happen i need to know the angles of the helicopter. Does anyone know the command to get the angles on a script object?
[0]
The three xyz numbers in angles are called using [0], [1], and [2].
if the angles were ( 45 90 -30 )
$my_chopper.angles[0] // would be 45
$my_chopper.angles[1] // would be 90
$my_chopper.angles[2] // would be -30
if the angles were ( 45 90 -30 )
$my_chopper.angles[0] // would be 45
$my_chopper.angles[1] // would be 90
$my_chopper.angles[2] // would be -30
I looked at your heli script in MW1 and that thing looks greek. I am not a scripting god like you jv. A lot of those commands I have never even seen.
I thought of doing something with t|trude's pointer and have a panel that the player clicks buttons to move, but I never did figure out how to get it so the helicopter would go. How do you do it so the helicopter moves when the player clicks something. Could you do it like this?
I tried something like this before on a helicopter that the player stepped on tiles but something was wrong. The while command didnt loop.
I thought of doing something with t|trude's pointer and have a panel that the player clicks buttons to move, but I never did figure out how to get it so the helicopter would go. How do you do it so the helicopter moves when the player clicks something. Could you do it like this?
Code: Select all
bla bla bla all the stuff before //////
huey_standby: //this is a huey helicopter that I have made
/////give all of the trigger clickitems setthreads
go_up: //setthread for the helicopter to go up
$switch that i will have turn on
if (level.huey = 0) ///////checks to see it the huey is turned on before the
end player can drive
level.go_up = 1 ///says that the helicopter is going up
while (level.go_up = 1)
{
$huey speed 150
$huey moveup 5
}
goto huey_stanby
end
go_down: //setthread to go down
level.go_up = 0 //turn this off
if (level.huey = 0)
end
level.go_down = 1
while (level.go_down = 1)
{
$huey speed 150
$huey movedown 5
}
goto huey_standby
end
ride
You should probably just make it a helicopter ride for now. It can move from point A to point B to point C etc... and back to point A all by itself. The player can then have the option to jump in or out at each point. Even that wont be simple because the game does not like it when you move a player around curves.
I agree with Tom. It will be nearly impossible to get something satisfying like Jv's heli without scripting knowledge he has.
And I think u wanted to do it for SinglePlayer, where this ought to be perfect...
Reading ur script, I'd like to advise u to check for typos (like huey_stanby instead of huey_standby or like single equals in if-clauses)
If u were still determined, u can take a look at a map I once did where there is a steerable toy robot. It can't fly but it is controlled by Tom's pointer. U can find it here
For stuff following a path of waypoints, there are some examples out there. I've done a coal lore in snowhill, which u get in the recycling bin
And I think u wanted to do it for SinglePlayer, where this ought to be perfect...
Reading ur script, I'd like to advise u to check for typos (like huey_stanby instead of huey_standby or like single equals in if-clauses)
If u were still determined, u can take a look at a map I once did where there is a steerable toy robot. It can't fly but it is controlled by Tom's pointer. U can find it here
For stuff following a path of waypoints, there are some examples out there. I've done a coal lore in snowhill, which u get in the recycling bin
Oops!
Oh there are no typos in the script because I look it over and not try to rush it. I was rushing and forgot a couple things
. The map is a singleplayer airport. I will download the file and try your guy's suggestions. 
Looked at the toy robot map Wacko. It is nice I could try something like that with a helicopter
Looked at the toy robot map Wacko. It is nice I could try something like that with a helicopter

