I've been fiddling around with it some more and still can't find a solution. Could anyone please help me with this? I'm stuck on this and I really need to find a way to make it work.
I just can't make the bullets stop coming from left or right instead of up and down. I was also wondering if it was possible to make two streams of bullets come out instead of one and change the location of the streams depending on which direction you're facing?
- Game Maker Community
- → Viewing Profile: Posts: rauthelegendary
rauthelegendary
Member Since 29 Nov 2009Offline Last Active Jan 16 2010 10:38 AM
Community Stats
- Group New Member
- Active Posts 9
- Profile Views 298
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
0
none
Posts I've Made
In Topic: Ultimate Weapon Arsenal V3.6
04 January 2010 - 03:50 PM
In Topic: Ultimate Weapon Arsenal V3.6
31 December 2009 - 11:14 AM
Sorry to bump up a somewhat older topic.
I'm editing this example so it can be the base of my games shooting mechanics, but I'm running into some trouble editing it. Unlike the example, I have four sprite directions, right, left, up and down. It will shoot for right and left, but not for up and down. I've added two extra parts into the spreaded shooting script, but am not sure how I should set them up. Also, the shotgun still works for left and right, but the machinegun doesn't anymore. I'm not sure what I changed in order to make it stop working.
This is my current spread shot script. It's probably easier for you if I upload what I have so far, so I'll do that now.
EDIT:
http://www.megaupload.com/?d=KIHQ7MDU
I've uploaded the game
I'm editing this example so it can be the base of my games shooting mechanics, but I'm running into some trouble editing it. Unlike the example, I have four sprite directions, right, left, up and down. It will shoot for right and left, but not for up and down. I've added two extra parts into the spreaded shooting script, but am not sure how I should set them up. Also, the shotgun still works for left and right, but the machinegun doesn't anymore. I'm not sure what I changed in order to make it stop working.
/*SPREADED SHOOTING SCRIPT
BY daman123125
Can be used for machine guns, shotguns, and other spray-type weapons.*/
leftsprite=argument0; //the left facing sprite
rightsprite=argument1; //the right facing sprite
bullet=argument2; //the bullet object
xcreate=argument3; //the x position the bullet is created(relative)
ycreate=argument4; //the y position the bullet is created(not relative unless the value is set relative)
bulletamount=argument5; //the amount of bullets to shoot
//Shoot the BULLETS!//
if (sprite_index==s_character_right)//we facing right?
{
//shoots the bullets to the right of us
for (a=0; a!=bulletamount; a+=1;)
ID[a] = instance_create(x+xcreate,ycreate,bullet);
}
if (sprite_index==s_character_left)//we facing left?
{
//shoots it to the left
for (a=0; a!=bulletamount; a+=1;)
ID[a] = instance_create(x-xcreate,ycreate,bullet);
}
if (sprite_index==s_character_up)//we facing up?
{
//shoots it upwards
for (a=0; a!=bulletamount; a+=1;)
ID[a] = instance_create(xcreate,y+ycreate,bullet);
}
if (sprite_index==s_character_down)//we facing down?
{
//shoots it downwards
for (a=0; a!=bulletamount; a+=1;)
ID[a] = instance_create(xcreate,y-ycreate,bullet);
}
//Set the MOTION for the bullets//
for (a=0; a!=bulletamount; a+=1;)
{
with (ID[a])
motion_set(point_direction(x,y,targetx,targety)+choose(random(spreadability),random(-spreadability)),shotspeed);
}
with (bullet)
image_index=direction/10; //faces it to it's direction
//NOTE: To set target x/y spreadability, and shotspeed go to the bullet object's create event.This is my current spread shot script. It's probably easier for you if I upload what I have so far, so I'll do that now.
EDIT:
http://www.megaupload.com/?d=KIHQ7MDU
I've uploaded the game
In Topic: Issues Regarding Sprites And Aiming (run 'n Gun)
30 December 2009 - 03:12 PM
Thanks, that clears a lot up!
I'm going to try to make this all function in my game and if I have any qeustions I'll know where to find you
Thanks again
I'll be sure to use that menumaker as well
I'm going to try to make this all function in my game and if I have any qeustions I'll know where to find you
Thanks again
I'll be sure to use that menumaker as well
In Topic: Issues Regarding Sprites And Aiming (run 'n Gun)
30 December 2009 - 01:53 PM
I really need help on this one, so I'm afraid I have to bump it once more..
In Topic: Issues Regarding Sprites And Aiming (run 'n Gun)
29 December 2009 - 06:26 PM
Bump for great justice
- Game Maker Community
- → Viewing Profile: Posts: rauthelegendary
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content