Defend the castle type game problem (I'm new)
Fisrt off, I'm new (and 13), and not good at all with the program so don't laugh :)
Ok, so I've got a game where little orange guys run accross the screen and attack the castle, while you try to shoot them all down, I made a crosshairs, then used the preset "Mouse" movement, and made it so the orange guys died when you clicked on them, it works fine, but the only problem, is that the mouse obviusly isn't where the crosshairs are, so when I click on the enemy it doens't do anything.
So my question is how do I make the mouse jump to where the crosshairs are or something so that I can click with the crosshairs.
Thanks,
csrgamer.
Re: Defend the castle type game problem (I'm new)
without really seeing whats happening, and easier method would be make your crosshairs a static object (remove the mouse movement)
in your events, make an always.
then put under the crosshairs, set X position to Mouse X & set Y position to MouseY.
make sure the Hotspot for the crosshairs is centred so the crosshair is exactly where the mouse pointer is.
once you are satisfied, you can hide the mouse pointer.
Re: Defend the castle type game problem (I'm new)
If you use mouse movement on something you need to use "Fire 1/2 pressed" instead of left/right click. It catches everyone out.
Re: Defend the castle type game problem (I'm new)
You might also want to check the Hotspot of the crosshair. You will need to centre it so that when you set its coordinates or use the mouse movement the centre of the crosshair is in the right spot.
Re: Defend the castle type game problem (I'm new)
EDIT: Nevermind, I got it now, I put it on static, but it was Xmouse not MouseX, but all it did was make the crosshairs disapear, So I tried some stuff and the only thing that kinda worked is putting it on the "8 Directions" preset, which made the crosshairs follow the mouse, but the crosshairs follow a bit slower then the mouse, so that if you were to shoot while moving the mouse it wouldn't shoot where the crosshairs were, but where the mouse was, correct? So I'm not sure what I do now. :/
@Dynasoft, what do you mean "Fire 1/2 pressed"? Can't find anything like that :?
Re: Defend the castle type game problem (I'm new)
Hi csrgamer. Make an event and use the icon that looks like a joystick in the choices.
Marv
Re: Defend the castle type game problem (I'm new)
Quote:
Originally Posted by nivram
Hi csrgamer. Make an event and use the icon that looks like a joystick in the choices.
Marv
Erm, then what do I do with that?
Also, I added ammo with a counter, so when I click, the ammo goes down be 1, and when I press R it goes back up to 6, but I don't know how to make you stop being able to shoot while it's at 0, or how to make it take like say, 5 seconds to reload.
Thanks everyone, for helping :)
Re: Defend the castle type game problem (I'm new)
with the shoot while it is 0:
Add - Only one action when event loops to your event.
5 seconds to reload:
Have an Alterable Value and set it 5
Every 1 second subtract 1 from the Alterable Value
Marv
Re: Defend the castle type game problem (I'm new)
Quote:
Originally Posted by nivram
with the shoot while it is 0:
Add - Only one action when event loops to your event.
I got the reloading thing, thanks, but I'm not sure what you mean here, I tried putting that in the alterable strings thing for the counter, and I tried putting it in the Special Conditions thing, and the Alterable Strings for the cross hairs. So if you could simplify this for me, that'd be great, thanks.
I'd also like to know how to make a "muzzle flash" like a little flash right in the crosshairs whenever I shoot. Oh, and a gunshot noise, I've tried adding my own sounds but it tells me it's the wrong format, and idk the right one :/
Re: Defend the castle type game problem (I'm new)
Ok, what event do you have that makes it shoot at 0?
Add Only one action when event loops to that event and it will only shoot once.
Muzzle flash. Make an animation called MuzzleFlash, set it off the frame. Each time you shoot, create the MuzzleFlash animation object and set it to the center of your crosshair. When the animation ends, destroy the muzzle flash.
Marv