Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2013-09-20 20:29        
     
_grp = createGroup west; 
_unit = _grp createUnit ["US_Pilot_Light_EP1",getPosATL player,[],0.1,"NONE"]; 
hint format["%1",_unit];

All the hint gives me is a hexadecimal number.

Been stressing over this for ages, every combination I've tried has failed to create the infantry soldier. Any ideas?


Author Message


Posts: 635
Rank:


Level: Member

Country: uk
Location: N.W.
Occupation:
Age: 32
In-game name: big_wilk

 
#2 Posted at 2013-09-21 01:15        
     
just googled what that ment, coz new words and all...!

And yeah you would that's the units default military style designation based on what order you place the unit down on the map in on each team.

something like this in a playble units init feild:

nul = [this] execVM "myscript.sqf";

///myscript.sqf starts bellow

_unit = _this select 0;
hint format["%1",_unit];

would result in the name of the player in that slot:

Tested and it work for me in terms of createing a unit

_grp = createGroup west; _unit = _grp createUnit ["USMC_Soldier_Medic",getPosATL player,[],0.1,"NONE"]; hint format["%1",_unt classname];

the unit class name you used also worked.

Dont see the problem lol. Was useing mods when I tested it but hopefully this works in your https://www.dropbox.com/s/xx9d526lfxmqspp/Intel%40HINTFORMat.Takistan.rar

Added 1 minute later:

One last thing, make sure you have a unit of the same side on the map. Or have created a centre for that side otherwise you cant spawn units onto that side.

This post was edited by big_wilk (2013-09-21 01:37, ago)


Advertisement


Author Message


Posts: 4
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2013-09-21 13:45        
     
Ah, you're edit probably explains it. Will try that now.

I added the centers, and after tonnes of problems I figured out that the main issue was an invalid classname on the wiki page for some of my units.

Thanks for the quick response :-)

Added 1 hour 21 minutes later:

Now I have another issue, when spawning units - they seem to take the side of their model. How can I create a 'RU_Fuctionary1' without it's side being civilian.

This post was edited by KillerLUA (2013-09-21 16:09, ago)


Author Message


Posts: 635
Rank:


Level: Member

Country: uk
Location: N.W.
Occupation:
Age: 32
In-game name: big_wilk

 
#4 Posted at 2013-09-21 18:20        
     
_grp = createGroup west;

east
civillain
indi..

changeing that might work.


Author Message


Posts: 4
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2013-09-21 19:52        
     
In my script, I added a debug line:

hint format["%1",(side _oldUnit)];

It returned WEST so it is originally the side it should be, but when testing afterwards:

hint format["%1",(side player)];

I still got CIV, the group is getting created with the correct side - but the unit is not inheriting it. Any ideas?


Author Message


Posts: 635
Rank:


Level: Member

Country: uk
Location: N.W.
Occupation:
Age: 32
In-game name: big_wilk

 
#6 Posted at 2013-09-21 22:19        
     
Yeah, the way to solve that is to have a groups leader as the faction you want the group to be, but put the leaders chance of been presence bar to 0%. How you'd script that I don't know.


Author Message


Posts: 4
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2013-09-21 23:03        
     
I have no idea what that is unfortunately.