Jump to content
Sign in to follow this  
wld427

pos player

Recommended Posts

I have an issue......

i am working on xenos domination one side with Ai Spawn. What i have done is instead of only being able to spawn AI at the base i made it so a specific M113 Racs can be carried to wherever you set up your ambulance and then you can spawn soldiers. When the M113 is destroyed and respawns it is no longer named AISPAWN... i foxed the problem witht he spawn script no longer applying. Unfortunately the soldiers are spawned by this code......

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _grp createUnit ["SoldierGB", position AISPAWN, [], 0, "FORM"];

so should i change AISPAWN to pos player or is there a better way to do this. If i change it to pos player how is it written?

Share this post


Link to post
Share on other sites

Heya mate' not sure if this will help but it works,

In the vehicle init add this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;this addaction ["Call AI", "spawn.sqs",[],-1, false, false, ""];this addEventHandler ["killed",{_this exec "m113spawn.sqs"}]

For the spawn.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vehicle = _this select 0;

_grp = group player

_unit = _grp createUnit ["SoldierGB", position _vehicle, [], 0, "FORM"];

And the vehicle respawn sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;ENTER THIS CODE IN THE VEHICLE INIT

;this addaction ["Call AI", "spawn.sqs",[],-1, false, false, ""];this addEventHandler ["killed",{_this exec "m113spawn.sqs"}]

#start

hint "works"

~20

_vehicle = "M113_RACS" createVehicle getMarkerPos "Vehicle_ReSpawn"

_AISPAWNkilled = _vehicle addEventHandler ["killed", {_this exec "m113spawn.sqs"}]

_unit = _vehicle addaction ["Call AI", "spawn.sqs",[],-1, false, false, ""];

exit

wasnt sure what the respawn marker for the vehicle was so I just used Vehicle_ReSpawn. Anyway the addaction will be readded on every spawn

Odin

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×