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 / Raycast is not working

Author
Message
Brandi
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location:
Posted: 9th Apr 2010 09:24


I use this script for an entity, learning how to use raycast, the entity supposes to be destroyed when the game run since there walls, object entities surround it but it just stays there.

Is there anything wrong with my code?

Dreams really do come true ..
GHILLI
14
Years of Service
User Offline
Joined: 8th Apr 2010
Location: U.S.A.
Posted: 10th Apr 2010 01:27
make RAYCAST lowercase so it would be raycast=0 6000

If that doesn't fix it then idunno what to do, i have never needed to use raycast.

I recommend you dl FPI editpad
- GHILLI

"The road to Hell is paved with good intentions."
Brandi
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location:
Posted: 10th Apr 2010 12:16
Thanks Ghilli, it's still not working, I made another test with this code:



I use raycastup and the HUD does show!
When I replace raycastup with raycast, nothing shows up, i think i'm gonna post this to Bug section too.

Dreams really do come true ..
GHILLI
14
Years of Service
User Offline
Joined: 8th Apr 2010
Location: U.S.A.
Posted: 10th Apr 2010 19:32
what exactly are raycast and raycastup supposed to do? I read the description in the FPI Editpad but I still don't understand what it would be used for.

try taking out hudhide=1 and if that doesnt work then replace it with hudshow=useboxprompt or hudunshow=useboxprompt

again if i understood your goal/what raycast commands are meant to do I could probably help more.

"The road to Hell is paved with good intentions."
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 11th Apr 2010 11:45
raycast "casts a ray" in a particular direction and returns true if that ray hits something.

Don't trust me on this, but I think you mean raycast=400 which says that anything directly infront of the entity by 4 squares will be hit by the ray and return true.

But I think this only works for static objects... like walls.

Which is what it'd be used for, mostly just active AI, but there are other applications, say if you had attached the player to an entity and decided to "bonce" him against walls (like pong XD).


But again, don't trust me... I'm very untrustworthy.

Its not who you are or what you've done... its WHY you did it and how far you are willing to go.
If you fear speaking for yourself, make use the words of others while discovering your own voice.

Login to post a reply

Server time is: 2024-11-25 01:46:29
Your offset time is: 2024-11-25 01:46:29