OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: hex on 12 Dec 2004, 21:20:45

Title: Changing weapon
Post by: hex on 12 Dec 2004, 21:20:45
hey,
im a newbie to mission making, bt i know how the init to change a soldiers weapon but it dont work, it doesent say any things wrong with the script and the soldier loses his weapon bt doesent hav the weapon i gave him.. its like it doesent work on my pc
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 21:22:50
write what you put in their init plz
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 21:23:05
We can't help you at all.

Basically because we have very little info to go on.

You might want to let us know what you are putting into the init line.



Planck
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 21:24:37
you're late planck, should pick up the pace  ;D
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 21:25:23
The budgie distracted me.


Planck
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 21:26:19
budgie?  :P
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 21:26:49
i am puting

removeallweapons this; this addmagazine "Flpmm4a1bcmag"; this addweapon "Flpm4a1m203cmag"

Note the " i dnt actually put in the script and i repeat the Addmagazine part so i have enuff ammo
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 21:28:26
Try:

removeallweapons this; this addmagazine "Flpmm4a1bcmag"; this addweapon "Flpm4a1m203c"

Only a guess mind as I don't know this weapon.

Budgie......Budgerigar.........a birdie......sitting on my head telling me he is a 'pretty boy' and a 'sexy buddy'.


Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 21:30:47
nah its the rite weapon name cos i also tried it on a sniper but instead of that weapon i used the games M16 bt still didnt work
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 21:35:23
I would check and double/triple check that the magazine and weapon name are correct.


Planck
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 21:36:49
you are giving him these through a script you say? why? just use the init line. and that should work..... ???
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 21:38:47
lol thats wot i meant (newb) and i hav got the mag name and that rite
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 21:41:54
But......they don't really match:

Flpmm4a1bcmag
Flpm4a1m203cmag


Both are magazines.......no weapon

Which is correct?


Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 21:45:42
no

weapon Flpm4a1m203cmag

mag flpm4a1bcmag

if u want il copy n paste the walk thru on here so u can c for ur self
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 21:47:24
perhaps you could post the config section concerning this, that will settle it once and for all
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 21:47:40
Sorry I must be out of touch here, weapons don't usually have 'mag' appended to their names.



Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 21:48:46
wot u meen post in the config section?
(newb)
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 21:51:51
Are you getting these mag and weapon names from the config of the addon?


Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 22:09:52
yes
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 22:14:22
Well post up the relevant section of the config.cpp then, so I can see it myself.


Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 22:22:22
kk
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 22:24:40
class FLPM4A1M203CMag: FLPM4A1M203
   {
      scopeWeapon=2;
      scopeMagazine=0;
      displayName="M4A1 w/M203 (C-Mag)";
      model="\FLP_M4A1\FLP_M4A1_M203_CMag_proxy.p3d";
      muzzles[]={"M4A1CMagMuzzle","M203Muzzle"};
      class M4A1CMagMuzzle: FLPM4A1CMag
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 22:35:31
I think you might find that the real weapon name is:

FLPM4A1M203

Try it and see.......I really can't see any point in someons naming their weapon with mag appended.

But then I've never made a weapon addon.


Planck
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 22:42:42
Actually I am more than a little confused.

You have:

Flpmm4a1bcmag...........as a magazine added
Flpm4a1m203cmag........as the weapon added

Note also one name has an extra 'm' in it.

I would have said the first was a bullet magazine and the second was a rifle grenade.

I really don't see any weapon names in there.


Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 22:44:45
the extra m was a my typo..
and no they are correct weapon names and magazines

oh and the cmag is an acsesery ( iknow i spelt it wrong)
its a drum clip wot carries 100 shots and the addon has 25+ differ M4s
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 22:45:13
did you try it?
if not i suggest you do
planck generally will know what he is talking about
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 22:46:45
no, bcos its a differant gun
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 22:58:11
Weapon descriptions:      |WeaponNames:      |MagazineNames:      |
---------------------------------------------------------------------------------
M4A1            |"FLPM4A1"      |"FLPM4A1mag"      |
M4A1 with 2 mags taped together   |"FLPM4A12xMag"      |"FLPM4A1mag"      |
M4A1 with BETA C-Mag      |"FLPM4A1CMag"      |"FLPM4A1BCmag"      |
M4A1 with M203 Grenade Laucher   |"FLPM4A1M203"      |"FLPM4A1mag"      |
M4A1 with M203 and 2xMag   |"FLPM4A1M2032xMag"   |"FLPM4A1mag"      |
M4A1 with M203 and C-Mag   |"FLPM4A1M203CMag"   |"FLPM4A1BCmag"      |
M4A1 with m4 suppressor   (-30 dB)|"FLPM4A1SD"      |"FLPM4A1SDmag"      |
M4A1 with m4 and 2xMag      |"FLPM4A1SD2xMag"   |"FLPM4A1SDmag"      |
M4A1 with m4 and C-Mag      |"FLPM4A1SDCMag"   |"FLPM4A1SDBCmag"   |
M4A1 with M203 and m4 suppressor|"FLPM4A1M203SD"   |"FLPM4A1SDmag"      |
M4A1 with M203, m4 and 2xMag   |"FLPM4A1M203SD2xMag"   |"FLPM4A1SDmag"      |
M4A1 with M203, m4 and C-Mag   |"FLPM4A1M203SDCMag"   |"FLPM4A1SDBCmag"   |
---------------------------------------------------------------------------------

most of the weapon names and mags
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 23:01:29
From your last post I would say the weapon name is:

FLPM4A1

The rest are all magazines in various combinations for this base weapon.


EDIT:  excluding the FLPM4A1M203 which is the same weapon with the launcher and the FLPM4A1SD with silencer and the FLPM4A1M203SD which has both


Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 23:06:38
yeh, bt i want the M4a1 M203 with the Cmag wot is

Flpm4a1m203cmag

( btw i suggest u download this file it rulez u can get it from operationflashpoint.cz)
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 23:08:41
i disagree planck

weapon:
FLPM4A1M203CMag

mag:
FLPM4A1BCmag

but there is no grenade.... ???
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 23:12:16
yeh thats wot also puzzled me... no nade
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 23:13:10
This is the line you should try in your units init field.

removeallweapons this; this addmagazine "Flpm4a1bcmag"; this addmagazine "Flpm4a1m203cmag"; this addweapon "FLPM4A1M203"


Planck
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 23:14:08
If not......I give up


Planck ;D  ;D
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 23:14:58
lol

off the topic how long u guys been playing OFP?

ive been playing for 5 days..
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 23:15:13
i think i've heard of this before, was it made by Anarchy?
(a little off-topic)
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 23:17:22
no fliper
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 23:18:33
I do believe that:

Flpm4a1bcmag...........bullets
Flpm4a1m203cmag........grenade
FLPM4A1M203........rifle with grenade launcher


Planck
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 23:21:34
WRONG!

M4a1m203cmag IS the weapon
 
m4a1m203 is a completely differ weapon....


i jst think this part of the editor dnt work on my system cos its the 1st  time ive tried this
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 23:23:18
try it out and see what you get before dismissing everything!!!
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 23:26:21
u dnt get me m8

M4a1 M203 is an m4 with nade launcher rite?

M4a1m203cmag is an m4 with nade launcher WITH a drum clip
i know this for a fact
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 23:28:42
ok

Post the complete config


Planck
Title: Re:Changing weapon
Post by: Triggerhappy on 12 Dec 2004, 23:32:07
or ask the guy who made it, or reinstall ofp and try it then.
Title: Re:Changing weapon
Post by: hex on 12 Dec 2004, 23:33:28
ok thnx for ur help guys..

i gtg work at 6 am cya 2moz
Title: Re:Changing weapon
Post by: Planck on 12 Dec 2004, 23:35:17
You could also try this to check if your installation is faulty:

removeallweapons this; this addmagazine "M16mag"; this addmagazine "M16mag"; this addweapon "M16"


Planck