Scripts / How to turn collisions back on

Author
Message
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 24th Apr 2016 14:49 Edited at: 24th Apr 2016 14:51
Hey all

I have (with the help of OldPMan) adapted the default door.lua script to use for an animated canopy on a space craft model.

So far I have been able to get the animations and prompts working correctly, but the problem is that the canopy never gets collisions turned on again, which means the player can walk over the canopy as expected (like when it is closed), but once it has been opened\closed, the player can walk thru it.

Can someone spot what is missing\wrong in this script?



Reliquia....
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 24th Apr 2016 18:04
this should work
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
PartTimeCoder
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 24th Apr 2016 21:08
so is CollisionOn a per frame setting and not a global entity setting then?

just handy for future reference
PM
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 25th Apr 2016 04:33
@smallg, thanks for the input.

Yeah I thought that would work too, but still collision does not get turned on again, here's link to another thread about animations, which has a video that shows the issue.

Perhaps it is better to not turn collisions off at all, but if I don't the player can't get in the ship - not that it really matters - just thought it would be cool!

Reliquia....
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM

Login to post a reply

Server time is: 2024-04-27 08:41:45
Your offset time is: 2024-04-27 08:41:45