Home   Help Search Login Register  

Author Topic: A question with weapons  (Read 713 times)

0 Members and 1 Guest are viewing this topic.

Offline Wasper

  • Members
  • *
  • I'm a llama!
A question with weapons
« on: 24 Jul 2004, 04:45:03 »
Hi , is there anyway I can get certain units to start with the weapons that I want them to have? i.e US soldier start with AK.

Thanks. ;D

shadow99

  • Guest
Re:A question with weapons
« Reply #1 on: 24 Jul 2004, 05:08:23 »
This is the second question on OFPEC I am capable of answering.  :)

In the unit's initialization field put:
removeAllWeapons this;this addWeapon "AK47"

Remember, with the above code I've taken ALL the unit's weapons away, so you might have to put:
removeAllWeapons this;this addWeapon "AK47";this addWeapon "HandGrenade";this addWeapon "HandGrenade";... etc.

You can also do this through init.sqs if you know what this is. In init.sqs however, replace all the 'this's with the unit's designated name.

Offline Wasper

  • Members
  • *
  • I'm a llama!
Re:A question with weapons
« Reply #2 on: 24 Jul 2004, 05:10:15 »
Is there anyway I can get the unit to spawn with the weapon already reloaded?
And also how do I access this initsqs?  ::)

CopyrightPhilly

  • Guest
Re:A question with weapons
« Reply #3 on: 24 Jul 2004, 05:14:04 »
init.sqs is a file you make in the mission folder, you edit it with notepad

and as shadow99 said in that init file put

Code: [Select]
removeAllWeapons this
unitname addWeapon "G36a"
unitname addmagazine "G36amag"

replace unitname with the soldiers name
that will add a G36 with 1 mag to the soldier

cheers, Philly

Offline Wasper

  • Members
  • *
  • I'm a llama!
Re:A question with weapons
« Reply #4 on: 24 Jul 2004, 05:16:20 »
ahh many thanks , one more question , do you know where I could get an entire list of weapons names? I am trying to find out what the name of the weapon that the "hunter" class for resistance is using. I tried to type in kozlice ball but it crashes to desktop.  :-\

shadow99

  • Guest
Re:A question with weapons
« Reply #5 on: 24 Jul 2004, 05:30:31 »
The Command Reference, also known around here as 'Comref'. Not too knowledgable on this one, or the whereabouts of it. Sorry about that. Shouldn't be hard to find though, you needn't look far, it's only the most popular OFP file.  :D

The weapons part is near the very bottom.

CopyrightPhilly

  • Guest
Re:A question with weapons
« Reply #6 on: 24 Jul 2004, 05:33:01 »
do a search on these forums for somthing like

weapons

you should find the list or a link to the list

cheers, Philly

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A question with weapons
« Reply #7 on: 24 Jul 2004, 12:09:21 »
Tutorials - References - Weapon and ammo listings.

Add a magazine before adding the weapon to make the weapon loaded.

Read macguba's guide to mission editing for beginners for information on init.sqs and the other files you need for a good mission.

There are several versions of the comref available:  the online official version with added Comments and the old Unofficial version are probably the most useful.

Read the comref like a book:  don't stop to understand every command, just get an idea of what's there.

Also get to know your way around the Editors Depot - there is a lot of stuff there now.

Plenty of reviewed ArmA missions for you to play

Offline Wasper

  • Members
  • *
  • I'm a llama!
Re:A question with weapons
« Reply #8 on: 24 Jul 2004, 23:20:23 »
Ahhh. thanks  ;D

Now is there anyway I can remove a specific weapon from units?  I am trying to remove grenades from units but can't figure out how.  ???

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A question with weapons
« Reply #9 on: 24 Jul 2004, 23:50:42 »
removeMagazine
removeWeapon
Plenty of reviewed ArmA missions for you to play

Offline Wasper

  • Members
  • *
  • I'm a llama!
Re:A question with weapons
« Reply #10 on: 25 Jul 2004, 18:30:20 »
Thansk  ;D , but now I have another issue..  :(

I can't seem to spawn the m60 or the PK machine guns. I type in :

this addweapon "m60" or this addweapon "PK" .. but nothing happens when I preview the game , I know that I got in the correct command code name because the game doesn't crash to desktop , but I don't get the gun when I spawn.  ???

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A question with weapons
« Reply #11 on: 25 Jul 2004, 19:39:10 »
Some units - such as snipers, medics and civvies, can't carry MGs.    

Does it work with another weapon, for example M16?
Plenty of reviewed ArmA missions for you to play