Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (2 posts)

problem with making door disappear on trigger/keyboard using sunburn (more keyboard related then sunburn related)

Last post 8/8/2012 4:05 PM by jeffery carlson. 1 replies.
  • 3/30/2012 2:18 AM

    problem with making door disappear on trigger/keyboard using sunburn (more keyboard related then sunburn related)

    I have a problem with in which im using a trigger with sunburn trigger component which i have pictures and good details here on it:
    http://www.synapsegaming.com/forums/t/3056.aspx

    Usually i either press enter and  i cant go through the door. this code makes the door disappear and so i can walk through it:

     if (publicvars2.opendoor == true)

    {

    sceneInterface.ObjectManager.Find(

     

    "door_01", false, out obj);

     

    obj.Visibility =

     

     

    ObjectVisibility.None;

    obj.CollisionType = SynapseGaming.LightingSystem.Collision.CollisionType.None;

     

     

    }
    but if i manually set to true i can walk through door correctly.
    What i want is if i press enter the publicvars2.opendoor variable equals true and on next update it makes it invisible or should I put it in draw method because im torn.

    The problem: door disappers but acts as if its still their but if i set publicvars2.opendoor to true manually it does work like i intended without pressing the enter button.
    The expected solution is: after i press enter the door is made invisible and i can walk through it.
  • 8/8/2012 4:05 PM In reply to

    Re: problem with making door disappear on trigger/keyboard using sunburn (more keyboard related then sunburn related)

    Answer
    Reply Quote
    I made an invisible trigger object and a seperate class to solve this problem.
Page 1 of 1 (2 posts) Previous Discussion Next Discussion