Log in
Search
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.A question on how to do something in GML
4 posters
:: Game Making :: Game Maker Help :: Game Dev. Q&A
Page 1 of 1
A question on how to do something in GML
Ok, so here what I want to happen.
When the player hits a trigger the bomb blows up. I can't figure out how to make the bomb blow up!!! Here's what I tried
In Step Event:
if place_meeting(0,0,o_player)//when the player touches the trigger
{
sprite_index = s_trigger//dont matter here
image_index=1//dont matter here
image_speed=0//dont matter here
o_tnt.instance_change(o_explosion,1)//ERRRROOOOORRRRRRRR NOOOOOO
}
Heres the Error:
FATAL ERROR in
action number 1
of Step Event
for object o_trigger:
Whats up with that????!!!!
COMPILATION ERROR in code action
Error in code at line 6:
o_tnt.instance_change(o_explosion,1)
at position 8: Variable name expected.
When the player hits a trigger the bomb blows up. I can't figure out how to make the bomb blow up!!! Here's what I tried
In Step Event:
if place_meeting(0,0,o_player)//when the player touches the trigger
{
sprite_index = s_trigger//dont matter here
image_index=1//dont matter here
image_speed=0//dont matter here
o_tnt.instance_change(o_explosion,1)//ERRRROOOOORRRRRRRR NOOOOOO
}
Heres the Error:
FATAL ERROR in
action number 1
of Step Event
for object o_trigger:
Whats up with that????!!!!
COMPILATION ERROR in code action
Error in code at line 6:
o_tnt.instance_change(o_explosion,1)
at position 8: Variable name expected.
Re: A question on how to do something in GML
o_tnt.instance_change(o_explosion,1)//ERRRROOOOORRRRRRRR NOOOOOO
WHY WHY DOES THAT CAUSE AN ERROR!!!!??????
WHY WHY DOES THAT CAUSE AN ERROR!!!!??????
Re: A question on how to do something in GML
Just use collision event. And the o_TNT.instancechsnge is being recognized as a variable.
Re: A question on how to do something in GML
Do:
with(o_tnt){instance_change(o_explosion,1)} //script by carny
with(o_tnt){instance_change(o_explosion,1)} //script by carny
Re: A question on how to do something in GML
Some how I don't think gamemaker would recognize the variable "Carny"
Re: A question on how to do something in GML
LOL I realized what the error was!! Soooooo simple I didn't make it relative for if the player was touching!!! Hahahahahahahahahahahahahah
Thanks for helping tho guys I appreciate it!
Thanks for helping tho guys I appreciate it!
Re: A question on how to do something in GML
with(o_tnt){instance_change(o_explosion,1)} //script by carny
I used that to
I used that to
Similar topics
» Ask a Question
» Maybe a stupid question
» Question Game
» An Important Question About Metroid Prime 3
» Maybe a stupid question
» Question Game
» An Important Question About Metroid Prime 3
:: Game Making :: Game Maker Help :: Game Dev. Q&A
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|