Home   Help Search Login Register  

Author Topic: Create a Civilian using a script (whit weapon)  (Read 1088 times)

0 Members and 1 Guest are viewing this topic.

cain87

  • Guest
Create a Civilian using a script (whit weapon)
« on: 26 Feb 2003, 20:26:57 »
Hello everyone.

I got a big problem, I manage to create some civilians using a script. But i want them to start whit a weapon. Say CZ75. ???

Quote
"civilian7" createunit [getpos _pos,_grp,"",1,"SERGEANT"]

What do i need. Plz help me out.


/Cain  :-\

« Last Edit: 26 Feb 2003, 20:31:23 by cain87 »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Create a Civilian using a script (whit weapon)
« Reply #1 on: 26 Feb 2003, 21:09:43 »
next line of your script is

civilian7 addmagazine "M16"
civilian7 addweapon "M16"

etc

once the unit is created you can use all ordinary commands on him
Plenty of reviewed ArmA missions for you to play

cain87

  • Guest
Re:Create a Civilian using a script (whit weapon)
« Reply #2 on: 26 Feb 2003, 21:28:44 »
I gotte be out and bikeing. Check this m8.


Quote
;begin script

_pos = _this select 0
_grp = _this select 1

"civilian6" createunit [getpos _pos,_grp,"",1,"PRIVATE"]
~1
;------------------------------------------------------------------------------
;the following 4 lines are optional. You can set the groups behaviour etc...
;to your preference. Change or delete lines as you see fit.
;------------------------------------------------------------------------------
_grp setformation "LINE"
_grp setbehaviour "SAFE"
_grp setcombatmode "GREEN"
"_x allowfleeing 0" foreach units _grp

civilian6 addmagazine "CZ75"
civilian6 addweapon "CZ75"

exit

cain87

  • Guest
Re:Create a Civilian using a script (whit weapon)
« Reply #3 on: 27 Feb 2003, 22:38:33 »
Guys, u  gotta help me whit this one. (and fast :) )

up, and up.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Create a Civilian using a script (whit weapon)
« Reply #4 on: 27 Feb 2003, 23:33:07 »
CZ75Mag
Plenty of reviewed ArmA missions for you to play

cain87

  • Guest
Re:Create a Civilian using a script (whit weapon)
« Reply #5 on: 28 Feb 2003, 16:49:57 »
hmm dam, but i still dont get the weapon.??? whats wrong?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Create a Civilian using a script (whit weapon)
« Reply #6 on: 28 Feb 2003, 18:14:57 »
Can you give him a nice easy weapon like "M16"?    Or is the whole thing fubar?
Plenty of reviewed ArmA missions for you to play

cain87

  • Guest
Re:Create a Civilian using a script (whit weapon)
« Reply #7 on: 28 Feb 2003, 20:56:03 »
The thing is like this. Iam workin on a new game type. Its based on GTA3 and MAFIA. U can buy Thugs, w.h.o.r.e.s, cars and drug factoryies ect. The list is long. So level one Thug= CZ75, level two Thug, UZI, level three thug = G36a  :)


I dont know anything about scripts but i have complited  50 % of the map thanks to InqWiper. So thats why i can use m16 on them.

BTW whats "fubar"
« Last Edit: 28 Feb 2003, 21:25:01 by cain87 »

Kaliyuga

  • Guest
Re:Create a Civilian using a script (whit weapon)
« Reply #8 on: 28 Feb 2003, 20:59:16 »
Fu**ed Up Beyond All Recognition ;)

F.U.B.A.R.


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Create a Civilian using a script (whit weapon)
« Reply #9 on: 28 Feb 2003, 21:45:01 »
What I meant was, can you make it physically work with an M16?   (Or Uzi or anything you like.)  If you can, then we know the problem is something to do with the weapon.   If you can't, then the problem is something else.

Just trying to pin down where exactly its going wrong.    If we know where the problem is its a lot easier to figure out exactly what it is.   And once you know exactly what it is, tis a lot easier to solve.  :)
Plenty of reviewed ArmA missions for you to play

cain87

  • Guest
Re:Create a Civilian using a script (whit weapon)
« Reply #10 on: 01 Mar 2003, 17:20:40 »
Quote
you make it physically work with an M16

Nope  nothing works :-\. Can i add a  name on the civilians in some way?

But 2 more things, Why cant civilians have law on their back? And where do i find a list of all new houses on Nogova (gonna use them as drug factoryies and w-h-ore houses)
« Last Edit: 01 Mar 2003, 17:21:39 by cain87 »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Create a Civilian using a script (whit weapon)
« Reply #11 on: 01 Mar 2003, 18:26:30 »
you can name civvies just like anybody else.

however, they don't have a big weapon slot so they can't have a LAW ... bit like a medic really.

Tell us more about the problem.   What actually happens?   Where does it go wrong?

 
Plenty of reviewed ArmA missions for you to play

InqWiper

  • Guest
Re:Create a Civilian using a script (whit weapon)
« Reply #12 on: 01 Mar 2003, 23:56:54 »
problem solved:
"Civilian7" createunit [getpos player,group player,{this addmagazine "CZ75mag";this addmagazine "CZ75mag";this addmagazine "CZ75mag";this addmagazine "CZ75mag";this addmagazine "CZ75mag";this addweapon "CZ75"}]

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Create a Civilian using a script (whit weapon)
« Reply #13 on: 02 Mar 2003, 13:32:16 »
To name a unit made with createunit, you'll want to include the name the init part of the createunit array... eg:

"civilian6" createunit [getpos _pos,_grp,"civ6 = this",1,"PRIVATE"]

;)