Home   Help Search Login Register  

Author Topic: entrench script (just an idea...)  (Read 763 times)

0 Members and 1 Guest are viewing this topic.

lipan_marder

  • Guest
entrench script (just an idea...)
« on: 24 Jun 2005, 09:18:07 »
hello... im new to scripting, so just thought would like to share an idea with you all.

okey, here goes: wouldn't it be nice if we could order our units to dig in? so i just thought maybe we can create new user action to "dig in", then magically a foxhole or sandbag appear in front of the unit.

so what do u guys think? or if there is already this kind of script somewhere in the OFP community? i searched ofpec forum and didn't return any result

okey that's all, just an idea

DBR_ONIX

  • Guest
Re:entrench script (just an idea...)
« Reply #1 on: 24 Jun 2005, 13:20:00 »
It's easy enough.
Code: [Select]
diginAcc = this addaction ["Dig in","digin.sqs"]
digin.sqs :
Code: [Select]
_unit = _this select 0
_trench = "TrenchClassName" camcreate getpos _unit

Thats the basic thing, you need to change TrenchClassName to an object class name of a trench or something (Look in readme of the mod/addon that contains the trench your using, or the Lib1942 editing manual thing etc)

Really it should use trig to place it a little infront of the unit, but for some objects the above code will be fine, as it may create the foxhole (or whatever it is) with the unit in it :)

Good luck :)
- Ben

lipan_marder

  • Guest
Re:entrench script (just an idea...)
« Reply #2 on: 24 Jun 2005, 13:32:50 »
thanx... i'll try it right away  :)