Platform problem
#1
Posted 23 March 2012 - 03:00 PM
I have been trying to code a platform to disappear only when obj_jack have land on the platform itself. this is the code:
{
alarm[0]=60;
if instance_place(x,y,cloud_disappear)
{
instance_change(cloud_fade,true);
}
}
this is under alarm event as I have try putting it in step event and it does not work .
where went wrong ??
#2
Posted 23 March 2012 - 03:07 PM
By the way, this is not really advanced.
#3
Posted 23 March 2012 - 04:33 PM
Maybe you should have rather used the alarm declaration within the condition check.
By the way, this is not really advanced.
what do you mean ??
#4
Posted 23 March 2012 - 04:38 PM
#5
Posted 23 March 2012 - 04:39 PM
If you use an alarm[a]=b; statement in a step event, the alarm will be reset to b each step, and therefore never occur.
but that action code is not in step event . It is in alarm[0] event
#6
Posted 23 March 2012 - 04:43 PM
Meh, let me guess... that's not what you asked?this is under alarm event as I have try putting it in step event and it does not work .
where went wrong ??
#7
Posted 23 March 2012 - 04:46 PM
Meh, let me guess... that's not what you asked?this is under alarm event as I have try putting it in step event and it does not work .
where went wrong ??
this is what i ask , but I think there is a misunderstanding going on. What I mean by that statement is , I have tried putting those action codes in the step event and it did not work. The same problem occur even when I put those action codes in the alarm[0] event. So where did I do wrong ??
#8
Posted 23 March 2012 - 04:49 PM
Namely..?...The same problem occurs...
#9
Posted 23 March 2012 - 04:52 PM
Namely..?...The same problem occurs...
obj_jack just went through cloud_disappear without having any contact at all [this is the same thing that happen when I put those codes in the step event]
#10
Posted 23 March 2012 - 05:03 PM
First of all, are you sure that the collision actually occurs?
Add a show_message(...) line inside the instance_place() check.
#11
Posted 23 March 2012 - 05:14 PM
Oh good we are getting somewhere.
First of all, are you sure that the collision actually occurs?
Add a show_message(...) line inside the instance_place() check.
never use this command statement before, how do I go about writing it ?? And I am assuming that the code will be switch to the step event instead of the alarm event, correct ??
#12
Posted 23 March 2012 - 05:20 PM
Just add something like:
show_message("Check");
inside the statement. If it bursts, then it's executed. Otherwise, not.
PS: there's a slight risk of getting the message continuously.
#13
Posted 23 March 2012 - 05:36 PM
Huh? Never used a show_message() before?
Just add something like:
show_message("Check");
inside the statement. If it bursts, then it's executed. Otherwise, not.
PS: there's a slight risk of getting the message continuously.
ok done, whenever I jump onto cloud_disappear, the message "Check" appear. which means , obj_jack does have contact with the cloud_disappear. But the weird thing is , I want it to meet the set timer before changing into another obj, but it did not.
ok, I think I know why already. Thanks anyway =D
Edited by _253669, 23 March 2012 - 05:47 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



This topic is locked







