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 / Player in shadow

Author
Message
Tax 78
15
Years of Service
User Offline
Joined: 23rd Sep 2009
Location: Italy
Posted: 7th Jan 2011 14:57 Edited at: 16th Feb 2012 00:35
If player is in shadow, and can not do it see?


Which script code should I use?


Sorry English but use a translator ^ ^


Thanks By Tax

Sorry but I use a translator
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 7th Jan 2011 17:51
There is no single script that doeas this. And there is also no FPSC game yet that has that feature.

I am afraid, you'll have to either script everything yourself or drop the idea.

In case you find my grammar and spelling weird ---> native German speaker ^^
Tax 78
15
Years of Service
User Offline
Joined: 23rd Sep 2009
Location: Italy
Posted: 7th Jan 2011 17:58
Ok, thanks for reply ^ ^

By Tax
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Jan 2011 20:34 Edited at: 7th Jan 2011 20:38
This is a very tricky illusion to perform. I did it once before way back in the day. Here's the basic setup of how such a script could work. Be forewarned, this requires ALL of your lights to be dynamic lights.

Attach a script to your lights that does the following:
- Check to see if player is within light's range
- If player is within light's range, increment a variable

In your enemy scripts, do the following:
- Check the variable to see if it is greater than 0
- If the variable is greater than 0, then the player can be be seen because they are in a light

In a triggerzone script (simply because the script should always execute) do the following:
- Using an etimer, reset the variable to 0 after a short delay (probably 1/4 of a second)

It is best to use the timer in the triggerzone script because of the randomness of operations when the engine is executing scripts. You don't want a light to be skipped over, so we have the reset script give a short delay before resetting the variable.

[EDIT]

Also, take note that this setup will suffer from having lights "see" the player through walls... so be aware of that when setting this up.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
Tax 78
15
Years of Service
User Offline
Joined: 23rd Sep 2009
Location: Italy
Posted: 7th Jan 2011 23:14 Edited at: 7th Jan 2011 23:14
Thank you!!! you've been very clear.


Now I put it to work


By Tax
darimc
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Canada
Posted: 16th Jan 2011 21:56
@Back to top, I have seen it done once before. In a game that was entered in one of my competitions.

Tax 78
15
Years of Service
User Offline
Joined: 23rd Sep 2009
Location: Italy
Posted: 23rd Jan 2011 23:53
Sorry I did not understand ... What should I do?

Login to post a reply

Server time is: 2024-11-24 13:51:47
Your offset time is: 2024-11-24 13:51:47