Home   Help Search Login Register  

Author Topic: back into modding, need help with scripts  (Read 2187 times)

0 Members and 1 Guest are viewing this topic.

Offline DLEGION

  • Members
  • *
back into modding, need help with scripts
« on: 22 Jun 2012, 16:06:21 »
Hello!
its an old OFP player here, and back in old times i was making sp campaigns....
now i decided to make a multiplayer COOP campaign, but i really need your help guys!
scripts have always been my weak point, and i need them!
i tried tutorials but didn't understand much.

in fact i saw on MP servers some very cool features like "drag body", "revive player", and i really need a simple melee attack that will damage anyone i am pointing at (maybe weak objects too, if possible)

can someone please explain me how do that?
and how use this revive-drag functions?

huge thanks

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: back into modding, need help with scripts
« Reply #1 on: 23 Jun 2012, 10:04:56 »
Welcome to OFPEC :welcome:

I moved this topic here because I presume this belongs here as you talked about OFP and MP missions :dunno:
And as the board you posted this first is not for questions about scripting etc, it's for "Arma2 scripts and functions, tutorials and tools for beta testing" as it states in the board header.

If we're still in the wrong section I'll just move this around some more then :P
« Last Edit: 23 Jun 2012, 10:09:41 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline DLEGION

  • Members
  • *
Re: back into modding, need help with scripts
« Reply #2 on: 23 Jun 2012, 12:39:04 »
thanks!
in fact is my fault beacause now i want mod for ARMA II OA (combined operations), so i don't know if its the right place, anyway i hope someone can help me!
thanks!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: back into modding, need help with scripts
« Reply #3 on: 23 Jun 2012, 21:31:11 »
Aand moved to here (for now :P )

I have no idea what has been done on those servers you mention but the game comes with the dragging feature I believe, it's in one of the modules (the new section in the editor, F7), IIRC it is in the "First Aid: Battlefield Clearance".

You place that module on the map and sync (F5) the module to each playable unit that should be able to do the dragging.

That revive thing is probably some custom script thingy.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline DLEGION

  • Members
  • *
Re: back into modding, need help with scripts
« Reply #4 on: 24 Jun 2012, 01:45:08 »
thanks ! i'm gonna try! will let you know the results... for now my melee script does not work well....it uses a moving trigger and cannot make differences from men and vehicles, so it's a problem!

Offline DLEGION

  • Members
  • *
Re: back into modding, need help with scripts
« Reply #5 on: 27 Jun 2012, 14:39:51 »
well ....i post a couple of useful scripts i found and adapted to my needs:

a script to make an unit move relentless in a direction of another unit:

Code: [Select]
_null = [] spawn {     while {true} do {        UNIT1 domove (getPos UNIT2);UNIT1 allowfleeing 0;UNIT1 disableAI "target";UNIT1 setspeedmode "limited";       sleep 5;     };  };
and now a scrit to kill anyone inside it (placed in a trigger...with ANYONE PRESENT as activation condition)

Code: [Select]
{_x setDammage (getdammage _x) +1} forEach thislist;
as bonus, last one gives add an action to units near itself, and remove it if they go far. must be placed in init of an object (or unit, i suppose):

Code: [Select]
this addAction["Raise Bridge", "raisedbridge.sqs", nil, 6, True, True, "", "(_target distance _this) < 3"];this addAction["Lower Bridge", "lowerdbridge.sqs", nil, 6, True, True, "", "(_target distance _this) < 3"];
hope it helps others....