Scripts / Hiding system script help

Author
Message
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 22nd Aug 2015 21:04
Hi to all .after a little break I'm working again with gg and i'm starting my first real project(hoping into gg improvement with next update) tha will be and enviromental adventure fps with in an isolated space station with enviromental puzzles and classic gameplay situation like ,notes, key-door system...nothing complex.. LOL

but in my game I would to put in a sense of horror with some alien creatures that come into the space station and hunt for the player that cannot have any weapon but can only contrast the monsters with envirometnal traps and hiding from them

and related to hiding I really want to know if is there a way I can simulate the player hidig..(into lockers for example, or under a bed , into a box etc...)

is there a script.. or can someone elp me to make a script that can accomplish my needs???


thanks.. in advance

leon
PC Specs:

Q9550@3,8GHZ - 8GB RAM - SVGA R9 280 3GB GDDR5 - HDD WD 1500TB
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Aug 2015 23:29
Sure, use
If g_entity[e]['playervisible'] == 1 then
In the aliens script to check if the player can be seen... Combine this with a timer and you should be fine
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 22nd Aug 2015 23:38 Edited at: 22nd Aug 2015 23:40
thanks smallg

so in this script

where must i put the If g_entity[e]['playervisible'] == 1 then to accomplish my needs...

a timer? sorry but can you explaim me more please?

sorry but i'm very basic at coding
PC Specs:

Q9550@3,8GHZ - 8GB RAM - SVGA R9 280 3GB GDDR5 - HDD WD 1500TB
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd Aug 2015 00:22 Edited at: 23rd Aug 2015 00:28
it would likely need to go somewhere around this part
Quote: "AIEntityGoToPosition(EntObjNo,g_PlayerPosX+rndx2,g_PlayerPosZ+rndz2)"


and the timer would be so that if the player goes out of sight for over a set period of time the alien would reset - otherwise simply moving out of sight for a split second would be enough.

but a general check outside of any other conditions would likely be good enough too if you're using states - the default state above seems to be idle so...



i cant copy very well here but you'll need to include the rest of the code back in too (around the parts i commented to show placement)
edit; i just noticed that might stop the roar from working with the way it's currently coded but it's a minor issue i guess
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 23rd Aug 2015 09:43
ok thanks smallg...i'll try and see waht I'm able to do...
PC Specs:

Q9550@3,8GHZ - 8GB RAM - SVGA R9 280 3GB GDDR5 - HDD WD 1500TB
PM

Login to post a reply

Server time is: 2024-12-22 05:06:42
Your offset time is: 2024-12-22 05:06:42