Jump to content


Photo

Platform problem


  • Please log in to reply
12 replies to this topic

#1 _253669

_253669

    GMC Member

  • New Member
  • 77 posts

Posted 23 March 2012 - 03:00 PM

hi,

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 ??
  • 0

#2 ramses12

ramses12

    6

  • GMC Member
  • 5769 posts
  • Version:GM8.1

Posted 23 March 2012 - 03:07 PM

Maybe you should have rather used the alarm declaration within the condition check.
By the way, this is not really advanced.
  • 0

#3 _253669

_253669

    GMC Member

  • New Member
  • 77 posts

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 ??
  • 0

#4 ramses12

ramses12

    6

  • GMC Member
  • 5769 posts
  • Version:GM8.1

Posted 23 March 2012 - 04:38 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.
  • 0

#5 _253669

_253669

    GMC Member

  • New Member
  • 77 posts

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
  • 0

#6 ramses12

ramses12

    6

  • GMC Member
  • 5769 posts
  • Version:GM8.1

Posted 23 March 2012 - 04:43 PM

this is under alarm event as I have try putting it in step event and it does not work .
where went wrong ??

Meh, let me guess... that's not what you asked?
  • 0

#7 _253669

_253669

    GMC Member

  • New Member
  • 77 posts

Posted 23 March 2012 - 04:46 PM

this is under alarm event as I have try putting it in step event and it does not work .
where went wrong ??

Meh, let me guess... that's not what you asked?



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 ??
  • 0

#8 ramses12

ramses12

    6

  • GMC Member
  • 5769 posts
  • Version:GM8.1

Posted 23 March 2012 - 04:49 PM

...The same problem occurs...

Namely..?
  • 0

#9 _253669

_253669

    GMC Member

  • New Member
  • 77 posts

Posted 23 March 2012 - 04:52 PM

...The same problem occurs...

Namely..?


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]
  • 0

#10 ramses12

ramses12

    6

  • GMC Member
  • 5769 posts
  • Version:GM8.1

Posted 23 March 2012 - 05:03 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.
  • 0

#11 _253669

_253669

    GMC Member

  • New Member
  • 77 posts

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 ??
  • 0

#12 ramses12

ramses12

    6

  • GMC Member
  • 5769 posts
  • Version:GM8.1

Posted 23 March 2012 - 05:20 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.
  • 0

#13 _253669

_253669

    GMC Member

  • New Member
  • 77 posts

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users