• The forum has been updated. For an explanation of some of the changes, head over here.

WB Coding Moving ships

Currently viewing this thread:

This code added to mission templates, I added spr_ship to point A, entry_point 21 is point B
When this code woriking spr_ship moving point A to point B,
but when I enter scene after spr_ship doesnt spawn point A, it spawn point B
I want to starting position of spr_ship must point A, every I enter scene.

Code:
(2, 0, ti_once, [],[
    (entry_point_get_position, pos21, 21),
    (scene_prop_get_instance,":prop","spr_ship", 0),
    (prop_instance_get_starting_position, pos1, ":prop"),
    (scene_prop_get_instance,":prop","spr_ship", 0),
    (prop_instance_get_position, pos1, ":prop"),   
    (get_distance_between_positions, ":dist_falcon2", pos1, pos21),
    (store_div,":falcon2_hiz",":dist_falcon2",3),   
    (prop_instance_animate_to_position, ":prop", pos21, ":falcon2_hiz"),
]),
 
Last edited by a moderator:
Remove spr_ships from scene and add with a trigger,

(0, 0, ti_once,
[
(entry_point_get_position, pos0, 45),(set_spawn_position, pos0),(spawn_scene_prop, "spr_ship"),
(entry_point_get_position, pos13, 46),(set_spawn_position, pos13),(spawn_scene_prop, "spr_ship_2"),
(entry_point_get_position, pos14, 47),(set_spawn_position, pos14),(spawn_scene_prop, "spr_ship_1"),

], []),
Added barriers to above ships because spawned troops fall in sea.
 
Upvote 0
Top Bottom