Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Getting entities to snap to walls in the editor (issues)

Author
Message
Kravenwolf
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Silent Hill
Posted: 27th Apr 2009 03:06 Edited at: 27th Apr 2009 03:07
I've made a simple wooden plank that I want to set up so when you select it from the library, it will snap to the wall when you place it. I opened the script for one of the WWII signs that already use this process, and copied the 2 lines that supposedly allow this into my plank script.

defaultheight = 35 (sets the height for the board)
forwardfacing = 1 (supposedly snaps the entity to the nearest wall)

Here is my script:



The board's default height does set to 35 as it should, but for some reason, the green arrow won't appear that allows the entity to snap to the nearest wall when placed. Am I missing something, or does the 'snap to wall' command only work for static objects?

Success is not final--failure is not eternal.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Apr 2009 04:32
No, it will work for dynamic objects as well (such as the scifi automed)

You'll need to make sure the plank isn't in a level that you're loading as that would only bring back the previously loaded data for it. You'll need to use a level that didn't have the plank, or you'll need to get rid of ALL instances of the plank in the level, then save it and exit FPSC. When you load it back up, the plank should no longer appear in your entity list, which is good. Go add it again and this time it should use the new FPE information that you changed.


The one and only,


Kravenwolf
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Silent Hill
Posted: 27th Apr 2009 12:16
Hmm...I created a new test level and tried to add the plank model again with the updated FPE information, and the same problem occurs. The default height command is working properly, but the plank still doesn't snap to the wall when it's placed.

Success is not final--failure is not eternal.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Apr 2009 01:56
Interesting, what version of FPSC are you using?


The one and only,


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Apr 2009 02:40
Quote: "Interesting, what version of FPSC are you using?
"


Hey ply Kravenwolf's internet won't let him on thegamecreaters.com atm, he is using v1.15.

Kravenwolf
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Silent Hill
Posted: 28th Apr 2009 03:58 Edited at: 28th Apr 2009 03:59
So this is kind of embarassing...I spelled forward wrong, heh. It works fine now. No need for that to leave this topic though, eh Thanks for the assistance Ply. This thread can be locked.

-Kravenwolf

Success is not final--failure is not eternal.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Apr 2009 06:50
Glad you got it working.

For future reference, and to clarify:
The problem was misspelling the option in the FPE file.


The one and only,


Login to post a reply

Server time is: 2024-11-25 00:40:50
Your offset time is: 2024-11-25 00:40:50