Jump to content
avibird 1

Need help with keeping modified faces and voices to carry over after respawn of editor placed units.

Recommended Posts

This is how I spawn in enemy units using JEBUS scripts. Works well for most of my needs in a very simple way to with editor groups. 

 

0 = [this,"DELAY=",300,"PAUSE=",100,"EXIT=",myExitTrigger1,"INIT=", "{dostop _x} forEach (units _ProxyThis);(group _ProxyThis) setVariable ['Vcm_Disable', true]"] spawn jebus_fnc_main; 

 

I am trying to keep editor modified face/head model and voice for the spawned units of this group. I would like to add this code to the above removing the red part and adding this blue part. 

 

addMissionEventHandler ["entityRespawned",{  params ["_new","_old"];  if (_new isKindOf "CAManBase") then {  [_new,face _old] remoteExec ["setFace"];  [_new,speaker _old] remoteExec ["setSpeaker"];  }  }];

 

I can't seem to get the right bracket arrangement to see if this works. Need  assistance with the arrangement to setup of this code.

This is for a borg unit modification I am working on. The borg units work and look great only with editor units if I try to respawn the units the face and voice REVERT to the original face/voice. 

 

The reason I am asking here it's because the JEBUS thread is not very active and the smartest people usually lurk around this thread.

 

Thank you for the assist. 

 

Share this post


Link to post
Share on other sites
1 hour ago, avibird 1 said:

I would like to add this code to the above removing the red part

If you were able to highlight the code, then you can remove it.

 

1 hour ago, avibird 1 said:

addMissionEventHandler ["entityRespawned",{  params ["_new","_old"];  if (_new isKindOf "CAManBase") then {  [_new,face _old] remoteExec ["setFace"];  [_new,speaker _old] remoteExec ["setSpeaker"];  }  }];

This code should be executed once, therefore it should be placed, for instance, in initServer.sqf event script.

 

2 hours ago, avibird 1 said:

I can't seem to get the right bracket arrangement to see if this works.

Make the code readable, don't use strings with code (since code highlighting doesn't work in strings), as I demonstrated, and use programmer's editor with code highlighting.

Share this post


Link to post
Share on other sites

Still need some help. This how I spawn in AI units using editor placed units.  This is JEBUS spawn system. 

 

This is a code that spawns in A group

0= [this,"DELAY=",300,"PAUSE=",50,"EXIT=", myExitTrigger1] spawn jebus_fnc_main;

 

 This is a code that spawns in A group with code in its init

0= [this,"DELAY=",300,"PAUSE=",50,"EXIT=", myExitTrigger1,"INIT=",  "(group _ProxyThis) setVariable ['Vcm_Disable',true]"] spawn jebus_ fnc_main; 

This is a code that spawns in A group with  two other code lines merged                              

 

0 = [this,"DELAY=",300,"PAUSE=",100,"EXIT=", myExitTrigger1,"INIT=", "{dostop _x} forEach (units _ProxyThis);(group _ProxyThis) setVariable ['Vcm_Disable', true]"] spawn jebus_fnc_main; 

I am trying to add this to code to one of the above codes that works.

 

addMissionEventHandler ["entityRespawned",{ params ["_new","_old"]; if (_new isKindOf "CAManBase") then {  [_new,face _old] remoteExec ["setFace"];[_new,speaker _old] remoteExec ["setSpeaker"]; } }]; Can"t get the right setup getting errors with ] } ect to see if it will work. Can somebody just get the codes merged so i can see if it will work.  Avibird.       

 

 

 

 

 

 

 

 

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

×