Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

877476 Posts in 32868 Topics- by 24305 Members - Latest Member: orloff

May 19, 2013, 03:17:37 PM
TIGSource ForumsDeveloperTutorialsGame Maker For Beginners: Part II
Pages: 1 ... 5 6 [7]
Print
Author Topic: Game Maker For Beginners: Part II  (Read 56698 times)
JoeHonkie
Level 8
***


RIP Major Sebastian Bludd

joehonkie
View Profile WWW
« Reply #90 on: April 13, 2009, 07:59:49 AM »

Were you a little inconsistent with the naming of oEnemy, oEnemyBasic, and oEnemyFlyer, or am I just not paying enough attention?
Logged
DoctorAnus
Level 0
**


View Profile Email
« Reply #91 on: May 09, 2009, 10:28:49 PM »

I am having a little trouble with applying the fire delay: in which object's Actions am I supposed to enter these lines of codes? I tried it both with PlayerShip and PlayerShot and I can't seem to get it to work...

(Otherwise I think this tutorial is well written and very fun to follow.)
Logged
Katamaran
Level 0
**


View Profile Email
« Reply #92 on: May 10, 2009, 12:05:37 PM »

it's got to go in the step event of oPlayerShip, right where the original code you put in to fire it is. make sure to define the variables in the create event too, or it wont work (it probably wouldn't even compile)
Logged
Gainsworthy
Level 10
*****


BE ATTITUDE FOR GAINS...

afroman5k@hotmail.com
View Profile Email
« Reply #93 on: May 17, 2009, 03:57:44 AM »

Game Maker does that automatically though -- you can load a sprite sheet, tell it the width and height of each element and the number of elements and it loads it fine. (They all have to be the same width and height though.)

It does what now?

God damn. That would save me... a whole lot of time.

I'm still getting that "Sprite Choppa" though! Cause sometimes I like to do things manually. Thanks Boris!  Smiley
Logged
ubersquiz
Level 0
*


View Profile
« Reply #94 on: August 18, 2009, 10:57:54 AM »

Were you a little inconsistent with the naming of oEnemy, oEnemyBasic, and oEnemyFlyer, or am I just not paying enough attention?

Yes i noticed this too, its been making me scratch my head for the last 20 minutes. And then there is mention of chaning the animation speed with a variable, but no mention of where or how to do it, unless im not paying enough attention either ?
Logged
rrrowdy
Level 0
***



View Profile WWW Email
« Reply #95 on: August 20, 2009, 04:01:04 PM »

Thanks for the tutorials, they're really really useful! They've at least provided enough basic definitions for me to get my head around what's happening, and enough starting points to launch me into other things.

(Ha... stupidly requested the third one, then found it. Nevermind).
« Last Edit: August 20, 2009, 07:34:13 PM by rrrowdy » Logged
jakten
Level 0
***


Wizard

rpgr2000@hotmail.com mandraggannon
View Profile Email
« Reply #96 on: September 17, 2009, 06:51:34 PM »

I'm having a bit of trouble. I added the variable hp = 1. to oEnemy under the create event. But when I run the script it says that hp is unrecognized and I get errors from ever object that contains the variable "hp". How can i fix this? Everything else runs fine except the HP thing.

Sometimes when I delete some of the coding that has HP in it it will run fine, but when I press fire no bullet comes out and the enemy explodes..

Code:
ERROR in
action number 1
of  Step Event
for object oPlayerShot1:

Error in code at line 2:
   other.hp -= 1;

at position 2: Unknown variable hp

Edit: nevermind, I didn't understand that i had to make a collision event. Although I found that adding HP to the hp variable does nothing.
« Last Edit: September 17, 2009, 07:23:09 PM by jakten » Logged
Zest
Level 10
*****



View Profile WWW
« Reply #97 on: August 18, 2010, 07:22:49 PM »

Thank you very much for these tutorials, Derek! I'm really learning a ton from these. Unfortunately, I always tend to make some stupid mistake when I'm programming, and I'm sure that's what's causing this:

Quote



___________________________________________
ERROR in
action number 1
of  Step Event
for object oEnemyBasic:

Error in code at line 1:
   if (hp < 1)
      ^
at position 5: Unknown variable hp

I put the Collision event in the PlayerShot, I have the hp variable in Enemy and the EnemyBasic has the Enemy as a Parent... so I'm kinda scratching my head and trying to figure out where I screwed up. Any help would be greatly appreciated.
Logged

imaginationac
Level 2
**


Makin' games instead of makin' money.

imaginationac@msn.com imaginationac1 imaginationac1
View Profile WWW Email
« Reply #98 on: August 18, 2010, 07:35:32 PM »

Assuming you created a variable "hp" in the EnemyBasic object's Create Event, if you have a Create Event for any child objects (e.g. Enemy), you'll have to make sure it inherits parent actions. Easy way to do this is to write this as the first line of the Execute Code action of the Create Event for Enemy:
Code:
event_inherited();

This way, any of the actions from EnemyBasic's Create Event should carry over. (It's kind of like calling super() in a language like Java, C++, or ActionScript). Hope that helps.
« Last Edit: August 20, 2010, 09:21:43 PM by imaginationac » Logged

Youtube channel | Charger! Dev Log
              
Houndninja
Level 1
*


"That's what" ~ (she)


View Profile
« Reply #99 on: May 11, 2012, 08:31:45 PM »

Thanks these tutorials are really helping me and they look complicated but really are easy to understand and make so much sense.
Logged
aharlow95
Manbaby
*


View Profile Email
« Reply #100 on: June 19, 2012, 03:00:52 PM »

Which object would I edit to reduce firing? the ship or the bullet, or even a new object?
 P.S. Sorry if you already explained this.
Logged
John Sandoval
Level 10
*****


white mage


View Profile WWW
« Reply #101 on: June 19, 2012, 04:33:29 PM »

edit the variable firingdelaymax in the create event of the ship
Logged

Pages: 1 ... 5 6 [7]
Print
Jump to:  

Theme orange-lt created by panic