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 / Spawning an entity when plrdistwithin...

Author
Message
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 23rd Jul 2012 02:41
I'm trying to spawn a character when the player is near a decal. I can make text appear but for some reason there is no action like "spawncharacter=X". Is it even possible? Note that I'm not using a triggerzone so there is no IFUSED option.

Thanks
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Jul 2012 03:18 Edited at: 23rd Jul 2012 04:09
Try "settargetname=x" and "activatetarget=x". We use these all the time for spawning. You can use these in a script in a triggerzone, or in a script attached to a console the player may have interaction with, etc.

You will need to make sure the script for the entity you are spawning has the state lines to check first to see if it is being activated. For example:



The above checks to see if it has been activated. If yes, then do what you want. If no, then it loops back to the beginning and checks again.


Twitter: @NFoxMedia
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 23rd Jul 2012 22:14
But the problem is, there is no interaction or zone in a decal. If you don't understand then you could look at my decal script:
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 24th Jul 2012 07:24
Oh, I do understand. You can use the commands I gave you in the decal script then instead of a triggerzone. When the player is within whatever distance, then the decal can set the target and then activate it.


Twitter: @NFoxMedia
A dude
14
Years of Service
User Offline
Joined: 15th Mar 2010
Location: The Solar System
Posted: 30th Jul 2012 16:41
Thanks Blackfox the commands work!

Login to post a reply

Server time is: 2024-11-23 21:35:57
Your offset time is: 2024-11-23 21:35:57