Benniantor Posted June 4, 2006 Report Share Posted June 4, 2006 Can somebody please help me how to make a character collide with a gun and store it. I'm asking this question for my future project, Pure Shadow. I'm having alot of trouble with it. Please help. -Benniantor P.S: If you don't get it, I'll give you an image to explain it a little better. Just say so. Please help Link to comment Share on other sites More sharing options...
USC Posted June 4, 2006 Report Share Posted June 4, 2006 Umm...I'm guessing you want the ability to pick up and change weapons? Make a variable (call it "Guns" or something). When you hit an object, set that variable to different values. Then, make multiple events for shooting (IE : Guns = 1, then shoot at Shot Gun power; Guns = 2, then shoot at Air Rifle power). Hope that gives you some ideas. Link to comment Share on other sites More sharing options...
Benniantor Posted June 4, 2006 Author Report Share Posted June 4, 2006 I'm guessing you want the ability to pick up and change weapons Yeah. Something like the Harvest Moon select that GamerGuy designed. Something like this below. Something like that. The circles and stuff like that try to tell you what I mean. Can somebody please help? Link to comment Share on other sites More sharing options...
Rael0505 Posted June 5, 2006 Report Share Posted June 5, 2006 Didn't USC just tell you what to do? :E Link to comment Share on other sites More sharing options...
USC Posted June 5, 2006 Report Share Posted June 5, 2006 Oh, I see. I was thinking more like Halo, where you switch weapons when you run across them... Okay, make your *weapon selection* sprite, with however many weapons you want. Make a global variable (which I will call "Weapon limit")...for this example, we'll assume you want your character to start off with just two weapons, so set the variable to equal 2. Then, make a second global variable (I'll call it "Menu Selector"), and set it equal to 1 to start with. Assign the frames of animation for the *weapon selection* sprite to equal that of the "Menu Selector" variable (IE : If Menu Selector = 1, then display "Fist" frame; if Menu Selector = 2, then display "Sythe" animation, etc). Now, make a condition like this... ------------------------ If "Menu Selector" = ("Weapon limit" + 1) Then Set "Menu Selector" = 1 --------------------------------- If "Menu Selector" = 0 Then Set "Menu Selector" = "Weapon limit" ------------------------------------------- This will make it loop back to the beginning if you go past the number of weapons you have; or, if you're at the beginning, you'll jump to last weapon you have... As you get new weapons, increase the value of the "Weapon limit". Once you select your weapon, follow what I said before about changing the power of the weapon, based on what value the "Menu Selector" variable is. Hope that answers your questions. Link to comment Share on other sites More sharing options...
Recommended Posts