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
Script Help Moving Painting
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#1
Moving Painting

Trying to move a painting from closed to open for a hole in the wall. The process is unseen by the player, so I'm not concerned about animation. My script is as follows.

void OnStart()
{        SetEntityPlayerInteractCallback("secretButton", "OpenPainting", true);

    
}

void OpenPainting(string &in asEntity)
{
    SetEntityActive("openP", true);
    SetEntityActive("closeP", false);
    GiveSanityBoostSmall();
}

But when testing the map, despite having entity "openP" set as inactive, to be activated in script, it's active in the map, and the script doesn't seem to work.

I know this will probably make a lot of you laugh, but scripting isn't my strong point, so while this might be an easy fix for you, it really isn't for me. I've done one other interact callback before this, so I figured it wouldn't be too difficult. I was wrong, so it seems, ahaha.

03-02-2014, 02:10 AM
Find


Messages In This Thread
Moving Painting - by MsHannerBananer - 03-02-2014, 02:10 AM
RE: Moving Painting - by Daemian - 03-02-2014, 02:38 AM
RE: Moving Painting - by Romulator - 03-02-2014, 02:41 AM
RE: Moving Painting - by Mudbill - 03-02-2014, 03:40 AM
RE: Moving Painting - by MsHannerBananer - 03-02-2014, 12:45 PM



Users browsing this thread: 1 Guest(s)