Not crazy coding, but you would need to actually code something entirely different from a built in movement.
A stupid example that sort of explain my point would be if you had an event to move the bullet (or whatever you're shooting) 1 pixel then copy that 101 times. Job done.
If you're shooting the object in two directions, left and right it's easy to use a loop to move and detect collision on an object as many times as you like. If want 360 degree shooting you might want to look into trigonometry.
In other words: you need to code it yourself instead of using the built-in action.
You can then move the 'flying object' yourself by manipulating it's position.
For horizontal or vertical movement it's rather simple: just add or subtract from the x or y position. For example: x position = 200, add 100 and x will be 300 and the 'flying object' has moved a 100 pixels. And of course you can set the number pixels yourself, 100 isn't the max here.
For directional movement read about trigonometry or use Pythagoras theorem if you know at what point you're aiming.
If it's just simple two-directional movement, couldn't you simply:
Test for bullet object in play area, test for left direction on player object, then set bulletX - current bulletX -2 or -3?
You'd have to set up a second event to test the player character facing right, then set bulletX to current bulletX +2 or +3.
Then you could destroy the bullet as it leaves the play area; but this whole method could really screw up collision detection, as the bullet is basically skipping 2 or 3 pixels as it's being shot. If it collides with an object less than 4px wide, there's a chance no collision would occur. Bullets would also get "lodged" in walls and any background objects set for collision.
It's a quick and dirty way of accomplishing your goal, though.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
OK, this is easy.
There are multiple ways of doing this, but I find this to be the most accurate, and dependable way.
If you (or anyone else) needs further explanation for why this method is the best just ask.
Your bullet object should have some named variables first:
BulletXOrigin - the X position from which the bullet shoots
BulletYOrigin - the Y position from which the bullet shoots
BulletSpeed - how many pixels per loop the bullet moves (Higher = faster)
BulletDirection - the angle the bullet is traveling
BulletMove - the distance from the "spawn" point that the bullet has traveled
Then add this event:
- Set X Position of "Bullet" to
- Set Y Position of "Bullet" to
- Add to BulletMove of "Bullet"
thanks everyone for your input! really great ideas im not to worried about actually putting this in my current project seeing as 100 bullet speed is perfectly fine, i was just curious.
To The_antisony: that wouldnt work for my current project Celestia, as you can shoot at any angle, but for some of my other games that would work great, thanks!
[Game design makes my brain feel like its gonna explode.]