- Game Maker Community
- → Viewing Profile: Posts: wadaltmon
wadaltmon
Member Since 31 Jan 2011Offline Last Active Nov 09 2011 11:32 PM
Community Stats
- Group New Member
- Active Posts 109
- Profile Views 2465
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Friends
wadaltmon hasn't added any friends yet.
Posts I've Made
In Topic: code help
19 August 2011 - 10:31 PM
In Topic: code help
19 August 2011 - 10:20 PM
if it says unknown variable obj, then before the third line, put in "var obj;"
Oh! Then that's not the code you want to use. Use the variable " vspeed " for the movement on the y axis ( upward on the y axis is a negative number, downward is a positive number.
So, here's what your code should be...if (place_meeting(x+15,y+15,lightbeam) { with (lightbeam) instance_destroy(); obj = instance_create(x+15, y+24, lightbeam) with (obj) vspeed = //whatever value you want here. read above for what value ^^ }
That should work.
EDIT: Worked out all the mistakes. works now
It doesnt like the frist french bracket...
What? French bracket? (I assume you mean {}...)
Don't copy and paste. Just type in the code manually.
And where I put "//whatever value you want here. read above for what value ^^" I meant replace that with -50 or 50.
Okay ill let you if it works
ok
In Topic: code help
19 August 2011 - 10:19 PM
if it says unknown variable obj, then before the third line, put in "var obj;"
Oh! Then that's not the code you want to use. Use the variable " vspeed " for the movement on the y axis ( upward on the y axis is a negative number, downward is a positive number.
So, here's what your code should be...if (place_meeting(x+15,y+15,lightbeam) { with (lightbeam) instance_destroy(); obj = instance_create(x+15, y+24, lightbeam) with (obj) vspeed = //whatever value you want here. read above for what value ^^ }
That should work.
EDIT: Worked out all the mistakes. works now
It doesnt like the frist french bracket...
What? French bracket? (I assume you mean {}...)
Don't copy and paste. Just type in the code manually.
And where I put "//whatever value you want here. read above for what value ^^" I meant replace that with -50 or 50.
Okay ill let you if it works
In Topic: code help
19 August 2011 - 10:17 PM
Oh! Then that's not the code you want to use. Use the variable " vspeed " for the movement on the y axis ( upward on the y axis is a negative number, downward is a positive number.
So, here's what your code should be...if (place_meeting(x+15,y+15,lightbeam) { with (lightbeam) instance_destroy(); obj = instance_create(x+15, y+24, lightbeam) with (obj) vspeed = //whatever value you want here. read above for what value ^^ }
That should work.
EDIT: Worked out all the mistakes. works now
It doesnt like the frist french bracket...
What? French bracket? (I assume you mean {}...)
Don't copy and paste. Just type in the code manually.
And where I put "//whatever value you want here. read above for what value ^^" I meant replace that with -50 or 50.
In Topic: code help
19 August 2011 - 10:12 PM
Oh! Then that's not the code you want to use. Use the variable " hspeed " for the movement on the y axis ( upward on the y axis is a negative number, downward is a positive number.
So, here's what your code should be...[/b][/size][/color][/font] [font="monospace"][color="#000088"][size=2][b]if (place_meeting(x+15,y+15,lightbeam)[/b][/size][/color][/font] [font="monospace"][color="#000088"][size=2][b] {[/b][/size][/color][/font] [font="monospace"][color="#000088"][size=2][b] with (lightbeam) instance_destroy();[/b][/size][/color][/font] [font="monospace"][color="#000088"][size=2][b] obj = instance_create(x+15, y+24, lightbeam)[/b][/size][/color][/font] [font="monospace"][color="#000088"][size=2][b] with (obj) vspeed = //whatever value you want here. read above for what value ^^[/b][/size][/color][/font] [font="monospace"][color="#000088"][size=2][b] }[/b][/size][/color][/font] [b][font="monospace"][color="#000088"][size=2][b][/b]
That should work.
Umm code editor doesnt like it it says unexpected symbol line 1 position 1...i dont even think that GML code
EDIT: That or the website totally screwed up....
Website screwed up. Sorry. See my previous post for the real code.
- Game Maker Community
- → Viewing Profile: Posts: wadaltmon
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content