how can you make your player pickup a gun?????? :blush:
how can you make your player pickup a gun?????? :blush:

Condition:
player collides with gun
Action:
Gun turn flag 1 on
_________
Condition
Gun: Flag 1 is on
Action
Gun set X-Y relative to player
That is at the most basic level -- Enhancements to this are very possible based on how you design your game.
thanks im new at this!!!!
ok so make collision with player and gun turn gun flag 1 on x-y relitive to player i did it not workin

example:
www.skiosk-esd.com/clickteam/MMF2_examples/pickup.mfa
DT
Special Projects Director
hey buddy i cant get on your link!

Do you want to know how to make a gun pick up?
A little insight into how I make my games. This is from all of my engines to date!
- Gun Object
- Change Alterable Value A to Owned
- Change Alterable Value B to Armed
- Change Alterable Value C to Rounds
- Change Alterable Value D to Clips
- Create a Pick-up version of your Gun and add this code
- Inside Gun Pickup Object Behavior
- Group [ Start Of Frame ]
Shooting Gun
- [start of frame : destroy gun pick-up object]
- [Gun Pick-up collides with background : Bounce]
- [Gun Pick-up Object has Movement Type : Pinball Movement]
- [Set Pinball Movement to -Gravity 10- -Deceleration 0- -Move at Start checked- -Initial speed set to 30- Initial direction set to -32.32-]
Group Handgun 001
- Main Event Editor
- Player Collides with "Gun Pick-up Object" : Set Owned to 1 : Destroy Gun Pick-up Object /you've just collected and added this gun to your player.
- Upon Pressing "1" + Owned of Handgun = 1 : Set Armed to 1 /you can now activate the gun you previously collected by pressing "1"
- Owned of Handgun = 1 + Armed of Handgun = 1 : Set Position of Gun to Position 0,0 of Players Action Point, In Direction of Player, Located, Oriented. Set Direction of Gun to Direction of Player.
- Armed of Gun = 0 : Set Position of Gun "off screen"
- Owned of Gun = 1
- Armed of Gun = 1
- Rounds of Gun > 0
- Upon Pressing "Control" : Create "Bullet" at 0,0 from Gun's Action Point, in direction of gun, Located, Oriented.
- Create "Muzzle Flash" at 0,0 of Gun Action Point, in direction of gun, Located Oriented.
- Play Sample "Fire"
It gets even more complex than that and you can tweak this code in lots of different ways, which allows for reloading animations and variable rapid fire methods, but that should get you started in the right direction. Hope it's clear enough. [/list]

Right click and Save As...
DT
Special Projects Director



If your having problems with basic file saving, Programming might be a bit ahead of you.Originally Posted by doggsox23
You have to change the extension to .mfa after saving the file.
EDIT: Or you can change the filter on the file selector to "All Files" and name it "pickup.mfa".