Hi everyone, I have an issue with the operation player_spawn_new_agent.
I have created a new multiplayer game mode and what I want is when I press a menu button, the player who pressed this button spawn.
I want a way to spawn the player character because I've already try to spawn a bot and then the player control it and set the player face keys on the bot but the troop_set_face_keys operation don't seems to work too...
This piece of code is working (I can spawn things with it), it's just the player_spawn_new_agent operation don't do annything.
Also I dont have put the trigger ti_after_mission_start in my game mode.
Edit: This post is not solved at all, I've missclick the button and I dont know how to set it to unsolved...
I have created a new multiplayer game mode and what I want is when I press a menu button, the player who pressed this button spawn.
I want a way to spawn the player character because I've already try to spawn a bot and then the player control it and set the player face keys on the bot but the troop_set_face_keys operation don't seems to work too...
Code:
(1, 0, 0, [],
[
(multiplayer_is_server),
(get_max_players, ":num_players"),
(try_for_range, ":player_id", 0, ":num_players"),
(player_is_active, ":player_id"),
(neg|player_is_busy_with_menus, ":player_id"),
(try_begin),
(player_slot_eq, ":player_id", slot_player_to_spawn, 1),
(player_spawn_new_agent, ":player_id", 0),
(player_set_slot, ":player_id", slot_player_to_spawn, 0),
(try_end),
(try_end),
]),
This piece of code is working (I can spawn things with it), it's just the player_spawn_new_agent operation don't do annything.
Also I dont have put the trigger ti_after_mission_start in my game mode.
Edit: This post is not solved at all, I've missclick the button and I dont know how to set it to unsolved...
Last edited: