How do we create this request? "if dead" disregard "when mouse...

tapdroid

  • Posts: 115
I see no way to create "if TaptoFly is dead" disregard "when mouse is released"



Because  the game is still trying to switch on release when TaptoFly is no longer accessible.
Game then freezes.
bummer...

Justin

  • *
  • Posts: 4347
Just put everything inside if <TaptoFly150 is alive>

For Live Support: Join our discord server and ping me @justin.
I'm most often available between 8am and midnight Japan time. (GMT+9)

tapdroid

  • Posts: 115
Great, that worked, but what is wrong here?

TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at MethodInfo-4509()[Source/scripts/SceneEvents_17.hx:222]

============================================================

class SceneEvents_17 extends SceneScript
{
    public var _SCORE:Actor;
    public function new(dummy:Int, engine:Engine)
    {
        super(engine);
        nameMap.set("SCORE", "_SCORE");
    }
    override public function init()
================================
I'm lost...

LIBERADO

  • *
  • Posts: 2660
Please, show a screenshot of your current code.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Meestar

  • Posts: 652
Great, that worked, but what is wrong here?

TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at MethodInfo-4509()[Source/scripts/SceneEvents_17.hx:222]

============================================================

class SceneEvents_17 extends SceneScript
{
    public var _SCORE:Actor;
    public function new(dummy:Int, engine:Engine)
    {
        super(engine);
        nameMap.set("SCORE", "_SCORE");
    }
    override public function init()
================================
I'm lost...


Does your actor, SCORE, have a value?  Or one of your other actors?  That error code is basically saying "Hey, you are missing an actor somewhere, or are trying to access an actor after it has died (thus not existing any more)."
PM me if you require help.  I'm always glad to help out!

tapdroid

  • Posts: 115
This makes me think the "if TaptoFly " statement isn't working.
Like its still trying to call a dead actor, (TaptoFly 150) <- That's when the trouble started...


LIBERADO

  • *
  • Posts: 2660
You must select an actor in this block of your code:
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

yoplalala

  • *
  • Posts: 1530
You could put another if tap toFly is alive around the kill taptofly.

Because now you are killing  it 5 seconds after you checked if he was alive. But during these five seconds, maybe he died.

edit : oh and also like Liberado said :)

tapdroid

  • Posts: 115
LIBERADO

I removed it completely and still get the same error.

tapdroid

  • Posts: 115
yoplalala

taptofly can only die after 5 seconds.

tapdroid

  • Posts: 115
   It is a failed   "If" statement.
I changed it to

and the error is gone...

I wanted it killed, but I guess,    if off screen,  can't be touched.

Sad part is,  even with all the kick ass development that has gone into   Stencyl, I constantly have to find a way to work around flaws. I'm super busy, and end up nodding off at the computer. NO ONE should touch a computer if drunk, or sleepy...

P.S.  Thank you all for jumping in to save me.

TapDroid.com; "I'm not drowning, just waving."

« Last Edit: December 12, 2014, 07:09:09 am by tapdroid »