Forum Jump :

Author Message


Posts: 6
Rank:


Level: Member

Country: uk
Location: London
Occupation:
Age:
In-game name: Dave D

 
#1 Posted at 2011-06-03 20:29        
     
Hello, I have attached a script to my unit in the Editor with a MPEventHandler (MPRespawn)

In the unit's init I put an eventhandler for mp respawn and wrote the external script.

if(player in xarray)&&(player iskindof "BAF_Soldier_L_DDPM") then {
player setVehicleInit "   
x               
x
";                         
processinitcommands; 
 
};

But I am confused to this point as the -showscripterrors gives me the error

if(player in xarray)&&(player iskindof "BAF_Soldier_L_DDPM") |#|then {

Error then: Type Bool, expected if

Where "x" is a placeholder for what I wish to do

As to this I am confused, as I cannot make sense how the engine can see a simple code command as a boolean.
Some help would be appreciated, please.

This post was edited by Double Doppler (2011-06-04 11:29, ago)


Author Message

DarkXess  

Modsaholic Founder


Posts: 2878
Rank:


Level: Member

Country: cn
Location: PRC
Occupation:
Age: 38
In-game name: DarkXess

 
#2 Posted at 2011-06-03 20:42        
     
You put in the "units name" also the name of whats in the script? BAF_Soldier_L_DDPM
To make it more simple, change it to something smaller liker man1 or m1 and also in the units name in
the editor. Also which respawn script are you using?

1st - Check The Rules! 2nd - Use The Search!

Advertisement


Author Message


Posts: 6
Rank:


Level: Member

Country: uk
Location: London
Occupation:
Age:
In-game name: Dave D

 
#3 Posted at 2011-06-03 21:01        
     
For the mission I am doing, the unit's name is in the array hence (player in chiefarrray) and the condition must also be met if his classname is "BAF_Soldier_L_DDPM". On that the script retextures the unit.

The respawn template I am using is the general Zargabad Life respawn.sqf, which must also handle classchanges (changes player's class on respawn). For that reason is why I want the script to only retexture if the player's classname is "BAF_Soldier_L_DDPM".

This post was edited by Double Doppler (2011-06-04 11:30, ago)