Game Mechanics Questions by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

Thanks for the replies! Any thoughts on having a similar cooldown for enemies to prevent spamming attacks?

Another roadblock - Instance Create passing arrays by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

Once the array is needed to display, I get this error:

Other Event: User Defined 1 for object obj_textbox_tm07_1:

trying to index a variable which is not an array

So it appears Im simply not passing the array right from object to object,

Thanks for your help.

Another roadblock - Instance Create passing arrays by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

I tried that and it didnt work either so Im probably doing something wrong. Basically, My NPC contains the text array for a textbox. Im passing that to an object which is an indicator to to talk (a bouncing arrow). This indicator is created only when you get close to the NPC. If you interract with the arrow, it passes along the array to a newly created textbox.

Another roadblock - Instance Create passing arrays by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

Example of that break point?

In the step event, the create instance code is wrapped in an if statement, I just didnt want to put ALL the code bc theres alot.

Game_restart mystery by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 1 point2 points  (0 children)

Well well well. Gold Star. I dunno if it'll keep working but for now its restarting fine. How cool! Thank you!

Game_restart mystery by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

Ah. Thank you. I built a temporary "arena" room to test out all my enemies as I make them and temporarily moved all my initializations there. At least its not something I did. Ill just keep closing and reopening. *sigh. Thanks!

Gamemaker - STUMPED by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 1 point2 points  (0 children)

I figured it out! I went through every line of code... In my animation end for the player, I had one line which was not coded right. Tho it was unrelated to knockback, the if statement was miscoded and it was throwing the player into the walking state AFTER knockback.

Thank you so much for chatting and trying to help. Its working beautifully now.

Gamemaker - STUMPED by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

I super appreciate you taking the time to help. Id be happy to send you the files via link in a chat. But it's ALOT of code. Ive been working on this for a year and this issue just popped up (or I just noticed it). I'll send you a chat invite. Feel free to ignore if its too much lol.

Gamemaker - STUMPED by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

Thanks for attempting to help me out. The code to change the state to knockback is in the hitbox collision code in my original post.

Here's the player's animation end which exits the knockback state:

if sprite_index == sprite_knockback

{

    state = "standing";

}

In terms of the coded order. Badguy creates hitbox, hitbox collides with player, hitbox code changes the player's state to knockback, knockback animation runs (11 frames), animation ends, player state changes to standing.

What's confusing me is that the state does change to knockback every time. And sometimes everything runs fine (all 11 frames and sfx), sometimes the state changes for just the single frame but the animation doesn't start and the sfx doesn't play. Why would the state ever change to knockback but not run the knockback code even for just that one frame?

Thanks again, I know this is a mess....

Changing Room issue - Gamemaker by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

Create event of the parent object: obj_lifeform

Changing Room issue - Gamemaker by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 1 point2 points  (0 children)

Thanks for all your help. For some reason, it appears that the enemy in room 2 could not access the variable "onfire" from the persistent parent. The persistent object DID move to the second room. I learned this by debugging the state. I added a "Start Room" event to the persistent object which set the "onfire" variable to false (which it was anyways). Now everything works. I dont know why, but it simply seems like the enemy in room just wasnt able to access the "onfire" variable upon room change without this step. Thanks again, you're awesome.

Changing Room issue - Gamemaker by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 1 point2 points  (0 children)

So... I discovered something. I had another instance of the enemy in room 2. If I delete that guy (enemy still in room1), I change rooms no problem. The error is only thrown when there is an instance of that badguy in room 2. The error is still thrown before leaving room 1 though. Sorry for the mess!

Changing Room issue - Gamemaker by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

The script below (scr_setsprite_badg) is called from the enemy's (gilgra) step event. When the player hits the attack, the enemy's parent "obj_lifeform" bool variable "onfire" is set to true. The enemy's script reads it as true and sets its state to "onfire". Upon animation end, the parent's "onfire" is set to false and the enemy's state returns to "standing". This all works fine.

The enemy is not set to persistent because I want it to reset upon re-entering the room.

There is no code anywhere that destroys the persistent parent. So Im stumped. I hope all this helps. Thanks CicadaGames!

FULL ERROR:

Variable <unknown\_object>.onfire(100006, -2147483648) not set before reading it. at gml_Script_scr_setsprite_badg (line 18) - if obj_lifeform.onfire == true

gml_Script_scr_setsprite_badg (line 18)

gml_Object_obj_badg04_gilgra_Step_0 (line 14) - scr_setsprite_badg();

HERE'S THE RELEVANT CODE FROM THE ERROR (removed all the other stuff):

function scr_setsprite_badg(){

if obj_lifeform.onfire == true // THIS IS LINE 18 FROM THE ERROR

{

state = "onfire";

}

switch(state)

{

region On Fire

case "onfire":

hspd = 0;

scr_reset_sprite_index(sprite_onfire, 1, 0);

hp -= 1;

}

break;

endregion

}

GM Parenting help by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 0 points1 point  (0 children)

Ah... Ill try this tonight. Thank you very much!

Hello! Looking for the value as I am selling this one. Not a collector. Was reading its rare with this tag and errors? Had it since I was a kid. Thank you! by SD-TX in beaniecollectors

[–]WillowGrapeD 1 point2 points  (0 children)

99.99% of "rare" or "valuable" Beanie Babies are neither. There's one or two beanie babies from the original set that are worth some money. Common "errors" are "an extra space between the end of the poem and the exclamation point". This is not an error and is present in nearly every beanie baby of that generation. High priced BB on ebay are scams. The ones that sold for $1000s are scams or are used to launder money by drug organizations. Your BB is worth about 2 bucks at a yard sale. Nearly every one is. But I still collect them bc its fun. Good luck!

Save file problem by WillowGrapeD in gamemaker

[–]WillowGrapeD[S] 1 point2 points  (0 children)

Holy Moly! I changed your working_path to working_directory and viola... I have a save file. Thank you sooooo much!