Im trying to figure out how to spawn a scene prop in a scene and I've been partially successful. Iv managed to get the scene prop to spawn right in front of the player perfectly - but the problem is i only want it to spawn once and at the moment it seems to spawn constantly
Iv got the following code in module_mission_templates
(iv commented in what i believe each line roughly does but im probably wrong so feel free to correct me if i am)
Does anyone know how i could fix this, i realise its pretty basic but i cant figure out what to do
Iv got the following code in module_mission_templates
(iv commented in what i believe each line roughly does but im probably wrong so feel free to correct me if i am)
spawnscript = (
0, 0, 0, [],
[ (get_player_agent_no, ":player_agent"), # gets position of player and stores it in player_agent?
(agent_get_position, pos2, ":player_agent"), # sets pos2 as player_agent position
(position_move_y, pos2, 50), # moves pos2 forward (i think) by a small amount
(set_spawn_position, pos2), #sets the place where the scene prop will spawn to pos2
(spawn_scene_prop, "spr_feeding_trough_a"), #spawns the scene prop
])
Note iv just used a feeding trough to test it - i dont actually plan on spawning this
0, 0, 0, [],
[ (get_player_agent_no, ":player_agent"), # gets position of player and stores it in player_agent?
(agent_get_position, pos2, ":player_agent"), # sets pos2 as player_agent position
(position_move_y, pos2, 50), # moves pos2 forward (i think) by a small amount
(set_spawn_position, pos2), #sets the place where the scene prop will spawn to pos2
(spawn_scene_prop, "spr_feeding_trough_a"), #spawns the scene prop
])
Note iv just used a feeding trough to test it - i dont actually plan on spawning this
Does anyone know how i could fix this, i realise its pretty basic but i cant figure out what to do