Jump to content
Sign in to follow this  
Y2JON

A few newbie problems!

Recommended Posts

I am currently making my first ever OFP mission. It is very basic because I am not at all experienced with any of the commands and am only just starting to learn how to do certain things. Can anyone help me with the following:

1.) I want to give my soldier an AALauncher and ammo. I was told to type the following into the Initialization field:

this addweapon "AALauncher";this addmagazine "AALauncher";

Now this gives him the weapon but no ammo. Any help?

2.) When my team gets to a certain waypoint, I want an enemy plane to fly over. Again I was told to do the following but it doesn't work:

Insert plane, insert Waypoint (MOVE), insert another waypoint near my team, and then Synchronise the plane's first waypoint with my teams' waypoint.

If anyone could help me with these, that would be great, but please don't make the answers too complicated, I am not that experienced with Mission Editor!

Share this post


Link to post
Share on other sites

As helpful as those topics were, they didn't actually answer my questions. Thanks anyway, though.

By the way, I tried:

this addmagazine "AALauncher";this addweapon "AALauncher";

and this doesn't work either.

Any help? rock.gif

Share this post


Link to post
Share on other sites

Hmm that is supposed to work. You should have a space after the semi-colon though.<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addMagazine "AALauncher"; this addWeapon "AALauncher"(What unit are you trying to give it too? Snipers and medics have limited carrying ability (as you probably know))

Share this post


Link to post
Share on other sites

It's a downloaded unit actually. A UN Soldat, as it is called. biggrin_o.gif I don't know whether this would pose any restrictions.

Share this post


Link to post
Share on other sites

Try and see if it works on a regular soldier. It's supposed to work at least. I don't know about that UN Soldat though.

Share this post


Link to post
Share on other sites

OK, thanks, I'll try it on a regular soldier. This probably sounds stupid, but do you have to specify an amount with the magazine? For example:

this addMagazine 10 "AALauncher"; this addweapon "AALauncher"

10 being the amount of ammo. Just wondered.

Also, do you know how to solve my other problem, the plane thing?! tounge_o.gif

Share this post


Link to post
Share on other sites

Hi. Your soldier might have too many grenades on him. No room left to add AA magazine. You might have to start from scratch;

RemoveAllWeapons unit and then add his primary weapon and then aa etc.

Hope this helps. smile_o.gif

Share this post


Link to post
Share on other sites
OK, thanks, I'll try it on a regular soldier. This probably sounds stupid, but do you have to specify an amount with the magazine? For example:

this addMagazine 10 "AALauncher"; this addweapon "AALauncher"

10 being the amount of ammo. Just wondered.

Also, do you know how to solve my other problem, the plane thing?!  tounge_o.gif

You keep adding this addMagazine "AALauncher" after the addWeapon command, one magazine command per desired magazine smile_o.gif

The plane thing should work the way the others have described to you, you could check Johan's editing tutorial (link above), it's probably in there wink_o.gif AI planes and waypoints are a little wacky though I guess.

Share this post


Link to post
Share on other sites
Hi.  Your soldier might have too many grenades on him.  No room left to add AA magazine. You might have to start from scratch;

RemoveAllWeapons unit     and then add his primary weapon and then  aa   etc.

Hope this helps.   smile_o.gif

lol, I forgot about that, that's why he gets the weapon but not the ammo!

Share this post


Link to post
Share on other sites

I am no expert but I have found planes to be a bit unpredictable. A plane can't hover at a waypoint and wait like a helo could so if the plane can't continue on to its next waypoint because of your sync, it will end up going off and doing its own thing. Unless you have the planes behaviour set to CARELESS, it may be detecting and engaging the enemy elsewheres on your map. Try substituting a helo to check this. If true, there are a couple ways to get the plane where and when you want. Camcreate the plane, use setPos to position an existing plane close to the desired location at the proper time, keep the plane on the ground at the airport ( if the airport is available) by removing its fuel until you want it to take off. With a little more information about this specific part of your mission, getting the plane to do a flyover should be very doable.

Share this post


Link to post
Share on other sites

Thanks ShadowGuy for your help with the plane problem.

Sorry to be a bother but can I just ask if this is what I now do then:

thisremoveallweapons; this addmagazine "AALauncher"; this addweapon "AALauncher; this addmagazine "M16"; this addweapon "M16"

If this is correct, do I just get one rocket for the AA?

Share this post


Link to post
Share on other sites

Almost... tounge_o.gif Just your first line is reversed.

removeAllWeapons this; this addMagazine "AALauncher"; this addWeapon "AALauncher"; this addMagazine "M16"; etc etc. And yes you only have the strength to carry one AA rocket. smile_o.gif But you can carry four m16 magazines with it and a sidearm.

Share this post


Link to post
Share on other sites

Thanks a lot. I'll try it now. If it wasn't for this forum, I'd still be stuck on triggers! tounge_o.gifcrazy_o.gif

Share this post


Link to post
Share on other sites

Anyone have a list of all the weapons/ammo and the command names you can use with addWeapon and addMagazine?

Share this post


Link to post
Share on other sites

there is a list in both the comref and here.

the link contains unofficial addons magazine/weapons also

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×