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 Appearing wall
jewjitsu Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jan 2015
Reputation: 0
#1
Appearing wall

I have been trying to figure this out all day yesterday and today until now and am at my wits end.

void OnEnter()
{
AddEntityCollideCallback("Player", "ClosePassage", "Dwallvis", true, 1);
SetEntityVisible("defaultmove_1", false);
}

Then later on in my code I have

void Dwallvis(string &in asParent, string &in asChild, int alState)
{
SetEntityVisible("defaultmove_1", true);
}

I made a scriptarea called ClosePassage. It is not working and I have no idea why it isn't, for the love of Cthulhu please someone help me.
(This post was last modified: 01-07-2015, 07:19 PM by jewjitsu.)
01-07-2015, 07:17 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: Appearing wall

The awnser could be very easy here;
IF it is a STATIC OBJECT they can NOT be enabled\disabled.
it sorta CAN be done,
But i guess you are a beginner and i think you should work on the engine \ editor(s) a little first.
IF you want to know we can explane but you might not understand what we talk about.
About your WALL ; You can disable \ eneble 99% of the Entities, so please try adding an entitie in stead of a STATIC OBJECT.
Hope we helped here.
For more questions, be free to ask them, That's why we are here Wink
Good luck.
(This post was last modified: 01-07-2015, 07:28 PM by DnALANGE.)
01-07-2015, 07:27 PM
Find
jewjitsu Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jan 2015
Reputation: 0
#3
RE: Appearing wall

First I want to say thank you so much for replying. I already made it an entity and had researched how to make walls move, I tried making the entity inactive, and being nothing else worked I last tried to make it invisible before posting here.

defaultmove_1

Is the mansionbase default wall, I imported it into the model editor and exported it as an entity. My code above still does not make "defaultmove_1" invisible. Can anyone help?
01-07-2015, 08:53 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Appearing wall

You sure you created a body?
Without it the entitie wont work.
do not overwrite original files ever.
just save it as defaultmove_2 for example..
also be sure you have the wall in your story and if the names match in editor and script..
does your script work?
try with playgui, its the fastest and easyest way to test..
if you hear your .ogg then we go to the next step.
good luck.
(This post was last modified: 01-07-2015, 10:11 PM by DnALANGE.)
01-07-2015, 10:10 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Appearing wall

Alright, just check your entity to make sure it has a body and that the type is set to Object > Static instead of StaticProp (which is default). StaticProp cannot be enabled/disabled.

Also, you can try using SetEntityActive instead of Visible. That's what I normally use. I think if you set it invisible, the collision box will still remain, whereas active will disable the entity completely.

01-07-2015, 10:46 PM
Find
jewjitsu Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jan 2015
Reputation: 0
#6
RE: Appearing wall

Thanks guys! It was the StaticProp that I didn't know about. It works now. <3
01-08-2015, 12:49 AM
Find




Users browsing this thread: 1 Guest(s)