Results 1 to 2 of 2

Thread: pos player

  1. #1
    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 &#91;&#34;SoldierGB&#34;, position AISPAWN, &#91;&#93;, 0, &#34;FORM&#34;&#93;;[/QUOTE]


    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?
    Dco 1-502INF 101st Airborne (RET)

    http://pracs.rkslstudios.info/

  2. #2
    Heya mate&#39; 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 &#91;&#34;Call AI&#34;, &#34;spawn.sqs&#34;,&#91;&#93;,-1, false, false, &#34;&#34;&#93;;this addEventHandler &#91;&#34;killed&#34;,{_this exec &#34;m113spawn.sqs&#34;}&#93;
    [/QUOTE]

    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 &#91;&#34;SoldierGB&#34;, position _vehicle, &#91;&#93;, 0, &#34;FORM&#34;&#93;;

    [/QUOTE]

    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 &#91;&#34;Call AI&#34;, &#34;spawn.sqs&#34;,&#91;&#93;,-1, false, false, &#34;&#34;&#93;;this addEventHandler &#91;&#34;killed&#34;,{_this exec &#34;m113spawn.sqs&#34;}&#93;
    #start
    hint &#34;works&#34;
    ~20
    _vehicle = &#34;M113_RACS&#34; createVehicle getMarkerPos &#34;Vehicle_ReSpawn&#34;
    _AISPAWNkilled = _vehicle addEventHandler &#91;&#34;killed&#34;, {_this exec &#34;m113spawn.sqs&#34;}&#93;
    _unit = _vehicle addaction &#91;&#34;Call AI&#34;, &#34;spawn.sqs&#34;,&#91;&#93;,-1, false, false, &#34;&#34;&#93;;

    exit[/QUOTE]

    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


    "I have not failed, I just found 10,000 ways that would'nt work."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •