Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> GML, Parte dos
United States
phazonluigi
Posted: Jul 22 2008, 06:17 PM
Quote Post


^^The Metroid M&L Project has Re-Initiated Launch.^^


Group Icon
Group: Members
Posts: 784
Member No.: 4889
Joined: 1-January 08

Status: (0d) [--]


Ok I have asked quite a couple of people this question and I want reassurance from the one place that isn't gonig to ignore my topic like the ****ing GMC.

Ok I have a these sprites right?( Samus Ones to be exact. ) and I want to Implement Shooting. I however, don't want to the bullets she shoots to come out of her head or stomach. I want them to come out of her beam. The thing is She doesn't face two directions, she faces four. I want to know how you can make the bullets come out of a certain spot on the sprite, and how I could make these bullets go into the direction samus would be facing (if up then up, down then down, you get the idea.) If variables are needed, I am using: global.l for left global.r for right global.f for down and global.b for up. (global because samus uses them too.) besaically all of what I said would go into the shoot event of samus (keypad 1) and the creation event of power_beam. What Kind of techniques and coding could i use to pull this off?(Just Give me an Example of the front shooting Sprite)
Origin of Samus' Forward Shot Sprite is: X12 Y16 (Center origin).
Place I want the bullet to exit:X6 Y25

In the code for the shot vent am i supposed to Make the X and Y values relative to the origin by subtraction and addition? If not then how?
Thank you for your help.
The Pl

This post has been edited by phazonluigi on Jul 22 2008, 06:17 PM
PMEmail PosterMSN
Top
United States
orange452
Posted: Jul 22 2008, 06:21 PM
Quote Post


...and brotha, I hurt people...
[*]

Group Icon
Group: Members
Posts: 519
Member No.: 3337
Joined: 21-February 07

Status: (0d) [--]


if dir=1 //facing right
{
instance_create(x+4,y+8)
}

if dir=2 //facing up right
{
instance_create(x+4,y-8)
}

if dir=3 //facing up left
{
instance_create(x-4,y-8)
}

if dir=4 //facing left
{
instance_create(x-4,y+8)
}


--------------------
user posted image
************************************************************
PMEmail PosterUsers Website
Top
United States
phazonluigi
Posted: Jul 22 2008, 06:22 PM
Quote Post


^^The Metroid M&L Project has Re-Initiated Launch.^^


Group Icon
Group: Members
Posts: 784
Member No.: 4889
Joined: 1-January 08

Status: (0d) [--]


QUOTE (orange452 @ Jul 22 2008, 06:21 PM)
if dir=1 //facing right
{
instance_create(x+4,y+8)
}

if dir=2 //facing up right
{
instance_create(x+4,y-8)
}

if dir=3 //facing up left
{
instance_create(x-4,y-8)
}

if dir=4 //facing left
{
instance_create(x-4,y+8)
}

umm are you sure that would work? because you didn't name an instance in anypart of that code?
PMEmail PosterMSN
Top
United States
orange452
Posted: Jul 22 2008, 06:24 PM
Quote Post


...and brotha, I hurt people...
[*]

Group Icon
Group: Members
Posts: 519
Member No.: 3337
Joined: 21-February 07

Status: (0d) [--]


ya, but you can add the bullet to create.. cant you? I was just giving the x and y pos...


--------------------
user posted image
************************************************************
PMEmail PosterUsers Website
Top
United States
phazonluigi
Posted: Jul 22 2008, 06:30 PM
Quote Post


^^The Metroid M&L Project has Re-Initiated Launch.^^


Group Icon
Group: Members
Posts: 784
Member No.: 4889
Joined: 1-January 08

Status: (0d) [--]


QUOTE (orange452 @ Jul 22 2008, 06:24 PM)
ya, but you can add the bullet to create.. cant you? I was just giving the x and y pos...

Oh ok thanks I though it was the complete thing thanks man I won't forget this!
PMEmail PosterMSN
Top
United States
orange452
Posted: Jul 22 2008, 06:32 PM
Quote Post


...and brotha, I hurt people...
[*]

Group Icon
Group: Members
Posts: 519
Member No.: 3337
Joined: 21-February 07

Status: (0d) [--]


NP, actually, I did forget to add the code for what to create, so, my bad... but your welcome... nod.gif


--------------------
user posted image
************************************************************
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0368 ]   [ 13 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.25 ]