Forum Jump :

Author Message

JCass  



Posts: 4
Rank:


Level: Member

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

 
#1 Posted at 2018-01-19 22:00        
     
Hey, this is my first post and I hope I'm in the right place and section. I'm hoping someone can help me here, this seems like it should be an easy task (but we are talking about Arma here). Here's my problem:

I'm messing with the Iron Front mod (playing MP, locally hosted) and trying to get the C47 Skytrain to paradrop my AI teammates. Ideally everyone in vehicle except player(s). I tried all sorts of scripts and forums for this, had no luck after probably 15 attempts. Best I can make happen is ejecting myself and everyone else stays onboard and crashes.
So I eventually gave up on this entirely and decided to attempt to modify my AI spawn script to spawn my AI teammates, who already spawn w parachutes just outside my moving aircraft. The problem is that my units are spawning in at ground level, rather than my current altitude. I am aware of setPosAsl and similar commands but seem to be having some trouble implementing them correctly. I am a complete novice here obviously, although i have been reading up a lot on this stuff lately. Here is the code that is spawning them on the ground, any help is very much appreciated. Thanks!

private _randomSpawnPos = dropship getPos [-5, getdir dropship];
"B_Soldier_F" createUnit [_randomSpawnPos, (group player), "", 0.5];


Author Message


Posts: 1513
Rank:


Level: Member

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

 
#2 Posted at 2018-01-20 13:05        
     
I'd use this createunit command as it's a little more user friendly.

temp = group player createUnit ["B_Soldier_F", dropship modelToWorld [-5,0,0], [], 0, "FORM"];

the [-5,0,0] is an offset from the plane so you may need to play around with the numbers to get the best location, [0,0,0] would be dead center of the plane.


if you do want to stick to the current method then you will need to use

"B_Soldier_F" createUnit [[0,0], (group player), "this setpos (dropship modelToWorld [-5,0,0])", 0.5];

[0,0] will be the original spawn point and only uses two dimension (no height) then it will be moved to the setpos position next to the plane.

This post was edited by F2kSel (2018-01-20 13:19, 151 days ago)


Advertisement


Author Message

JCass  



Posts: 4
Rank:


Level: Member

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

 
#3 Posted at 2018-01-24 02:15        
     
Hey thanks F2kSel, that did it. I went with your first suggestion, everything is doing what I want for once.