OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Robinhansen on 26 Feb 2005, 11:37:09
-
I was thinking of why not expand the ammotrucks with replacement personel? When infantrycommanders etc. has lost 40% of his personal, he can regroup at the ammotruck. A little like the barrage in CTI, just whitout the mony stuff. I got the script to create soldiers, but not how to assign them to the players group.
-
Try:
[_pers] join player
EDIT:
In your script: what is _eng? It is a local variable that is not defined
-
And you need to use createUnit instead of createVehicle...
createVehicled dudes do not join you...
Or anybody else for that matter...
-
Don't createvehicled people not respond at all? Or is that camcreate or both?
Cause I remember testing a throw script and I threw a west guy at someone except he was pretty much useless. Didn't move, blink, look around, fire, or die. :P
-
createVehicle is sort of like camCreate. It just dumps an empty vehicle on the map. It's not designed to do sexy stuff.
-
You should use the createunit (http://www.ofpec.com/editors/comref.php?letter=C#createUnit) command when creating people, not createvehicle.
-
I'm sorry! I choosed the wrong script in the first placed. The one below works and is the one I use:
_p = _this select 0
_d = getdir _p
_man = "SoldierEB" Camcreate [(getpos _p select 0)+(5*sin _d),(getpos _p select 1)+(5*cos _d),0]
_man setdir (_d - 180)
exit
I only need to know how to assign it to the player who request it
;)
-
Don't createvehicled people not respond at all? Or is that camcreate or both?
Cause I remember testing a throw script and I threw a west guy at someone except he was pretty much useless. Didn't move, blink, look around, fire, or die. :P
CreateVehicled guys do bleed and such, but otherwise the are total vegetables :P
@Robinhansen:
That can not work. period.
camCreate creates an AI soldier alright but it has no 'life' in it...
It's just a shell...
So there is no way you can get a camCreated/createVehicled unit to join another, unless you rewrite OFP code somewheres...
Use createUnit, as suggested several times now ;)
-
Right! now I finally got it ::)
Is there a way to thange the "getMarkerPos" to, let's say a vehicle etc?
:D