Home   Help Search Login Register  

Author Topic: Bon's Recruit Script on Respawn  (Read 2508 times)

0 Members and 1 Guest are viewing this topic.

Offline PolkaBoy

  • Members
  • *
Bon's Recruit Script on Respawn
« on: 11 Jul 2013, 01:07:58 »
 Hello, I have using Bon's excellent ai recruit script for a long time and I decided it would be great if the player could activate the script instead of assigning the script to an object. For those that don't know about the script, this is a script that brings up a menu for the player to click on to recruit new units. I have changed the script so that the player can call up the Recruit menu and call in soldiers at his location that come in parachutes. The problem I have is that I cannot get the script to work when the player dies and respawns. I have spent hours researching the forums and I cannot come up with a working solution. Here are my init lines:

 init.sqf:
 [] execVM "bon_recruit_units\init.sqf";

 player's init line:
 this addAction ["Recruit Units", "bon_recruit_units\open_dialog.sqf"]; this addEventHandler ["killed", {this execVM "bon_recruit_units\open_dialog.sqf"}];

 I have modified the "this" in addeventhandler to read: this, _this, (this, 0), (_this, 0), and nothing seems to work. When my player respawns, there is no Recruit Units menu. If I move my mouse cursor over the original player's dead body, I do see the Recruit Units menu. Any suggestions?


 Robert W