The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HasItem problem [SOLVED]
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#1
HasItem problem [SOLVED]

What's wrong with this code? I have the key but it doesn't trigger the event.

void CollideAreaLiving(string &in asParent, string &in asChild, int alState)
{
    if(HasItem("key_storage") == true){
//Slime Fades
        SetPropActiveAndFade("slime_6way_1", true, 1.5f);
        SetPropActiveAndFade("slime_anim_wall_1", true, 1.5f);
        SetPropActiveAndFade("slime_pile_1", true, 1.5f);
        SetPropActiveAndFade("slime_pile_2", true, 1.5f);
//Effects
        StartScreenShake(0.115, 2.0f, 0.1f,0.3f);
        FadeSepiaColorTo(100.0f, 4.0f);
        FadeRadialBlurTo(0.15f, 6.0f);
        PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
//Timer to remove effects
        AddTimer("FadeGone", 3.0f, "GuardianTimer");
    }
}

The code still won't get triggered if I have that key. What's wrong with it?

Creator of The Dark Treasure.
(This post was last modified: 04-22-2011, 01:52 PM by Linus Ågren.)
04-09-2011, 07:58 AM
Website Find


Messages In This Thread
HasItem problem [SOLVED] - by Linus Ågren - 04-09-2011, 07:58 AM
RE: HasItem problem - by Pandemoneus - 04-09-2011, 09:51 AM
RE: HasItem problem - by Linus Ågren - 04-09-2011, 11:37 AM
RE: HasItem problem - by Dalroc - 04-09-2011, 01:36 PM
RE: HasItem problem - by Linus Ågren - 04-09-2011, 11:25 PM
RE: HasItem problem - by Dalroc - 04-09-2011, 11:44 PM
RE: HasItem problem - by Linus Ågren - 04-09-2011, 11:57 PM
RE: HasItem problem - by Dalroc - 04-10-2011, 12:12 AM
RE: HasItem problem - by Linus Ågren - 04-22-2011, 01:51 PM
RE: HasItem problem [SOLVED] - by Dalroc - 04-22-2011, 03:52 PM



Users browsing this thread: 1 Guest(s)