Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: http://gameml.iowoi.org/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com
Keywords


A question on how to do something in GML

View previous topic View next topic Go down

A question on how to do something in GML

Post by -js1210- on Sun Oct 25, 2009 3:25 pm

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.
avatar
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 32702
GameML Reputation : 27
Join date : 2009-06-02
Age : 22
Location : United States

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: A question on how to do something in GML

Post by CarnivorousA on Mon Oct 26, 2009 3:52 am

What you're too good to use a collision event?

_________________
avatar
CarnivorousA
Moderator
Moderator

Posts : 1402
Points : 32552
GameML Reputation : 17
Join date : 2009-06-01
Age : 23
Location : At the bottom of the lake.

View user profile http://entertainmypeople.freeforums.org/index.php

Back to top Go down

Re: A question on how to do something in GML

Post by -js1210- on Mon Oct 26, 2009 3:45 pm

Lol, that has nothing to do with the error at all!
avatar
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 32702
GameML Reputation : 27
Join date : 2009-06-02
Age : 22
Location : United States

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: A question on how to do something in GML

Post by Sparx the Cy-Wolf on Tue Oct 27, 2009 2:45 pm

well that was a waste of a topic.....
avatar
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 32455
GameML Reputation : 5
Join date : 2009-06-07
Age : 26
Location : Mother ship

View user profile http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Re: A question on how to do something in GML

Post by -js1210- on Tue Oct 27, 2009 4:17 pm

o_tnt.instance_change(o_explosion,1)//ERRRROOOOORRRRRRRR NOOOOOO

WHY WHY DOES THAT CAUSE AN ERROR!!!!??????
avatar
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 32702
GameML Reputation : 27
Join date : 2009-06-02
Age : 22
Location : United States

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: A question on how to do something in GML

Post by 3d on Tue Oct 27, 2009 8:24 pm

Just use collision event. And the o_TNT.instancechsnge is being recognized as a variable.

_________________
Creator of GameML, Thanks for Visiting!
avatar
3d
Admin
Admin

Posts : 1227
Points : 42336
GameML Reputation : 66
Join date : 2009-05-31
Age : 35
Location : U.S.A

View user profile http://gameml.iowoi.org

Back to top Go down

Re: A question on how to do something in GML

Post by CarnivorousA on Wed Oct 28, 2009 2:09 am

Do:
with(o_tnt){instance_change(o_explosion,1)} //script by carny

_________________
avatar
CarnivorousA
Moderator
Moderator

Posts : 1402
Points : 32552
GameML Reputation : 17
Join date : 2009-06-01
Age : 23
Location : At the bottom of the lake.

View user profile http://entertainmypeople.freeforums.org/index.php

Back to top Go down

Re: A question on how to do something in GML

Post by Sparx the Cy-Wolf on Wed Oct 28, 2009 3:09 am

Some how I don't think gamemaker would recognize the variable "Carny" Razz
avatar
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 32455
GameML Reputation : 5
Join date : 2009-06-07
Age : 26
Location : Mother ship

View user profile http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Re: A question on how to do something in GML

Post by CarnivorousA on Wed Oct 28, 2009 3:57 am

Oh right you make a constant; carny = awesome

_________________
avatar
CarnivorousA
Moderator
Moderator

Posts : 1402
Points : 32552
GameML Reputation : 17
Join date : 2009-06-01
Age : 23
Location : At the bottom of the lake.

View user profile http://entertainmypeople.freeforums.org/index.php

Back to top Go down

Re: A question on how to do something in GML

Post by -js1210- on Wed Oct 28, 2009 2:48 pm

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!
avatar
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 32702
GameML Reputation : 27
Join date : 2009-06-02
Age : 22
Location : United States

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: A question on how to do something in GML

Post by Sparx the Cy-Wolf on Wed Oct 28, 2009 4:18 pm

We helped? scratch
avatar
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 32455
GameML Reputation : 5
Join date : 2009-06-07
Age : 26
Location : Mother ship

View user profile http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Re: A question on how to do something in GML

Post by -js1210- on Wed Oct 28, 2009 4:35 pm

with(o_tnt){instance_change(o_explosion,1)} //script by carny

I used that to
avatar
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 32702
GameML Reputation : 27
Join date : 2009-06-02
Age : 22
Location : United States

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: A question on how to do something in GML

Post by CarnivorousA on Thu Oct 29, 2009 12:11 am

:[)

_________________
avatar
CarnivorousA
Moderator
Moderator

Posts : 1402
Points : 32552
GameML Reputation : 17
Join date : 2009-06-01
Age : 23
Location : At the bottom of the lake.

View user profile http://entertainmypeople.freeforums.org/index.php

Back to top Go down

Re: A question on how to do something in GML

Post by Sparx the Cy-Wolf on Thu Oct 29, 2009 4:25 pm

\m/ n_n
avatar
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 32455
GameML Reputation : 5
Join date : 2009-06-07
Age : 26
Location : Mother ship

View user profile http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Re: A question on how to do something in GML

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum