|
JoeHonkie
|
 |
« 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
|
 |
« 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
|
 |
« 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
|
 |
« 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! 
|
|
|
|
|
Logged
|
|
|
|
ubersquiz
Level 0
|
 |
« 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
|
 |
« 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
|
 |
« 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.. 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
|
 |
« 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:
___________________________________________ 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
|
 |
« 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: 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
|
|
|
|
Houndninja
Level 1
"That's what" ~ (she)
|
 |
« 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
|
 |
« 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
|
 |
« Reply #101 on: June 19, 2012, 04:33:29 PM » |
|
edit the variable firingdelaymax in the create event of the ship
|
|
|
|
|
Logged
|
|
|
|
|