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 / script, HELP

Author
Message
gmr1923
16
Years of Service
User Offline
Joined: 31st Aug 2008
Location:
Posted: 6th Jan 2009 22:28 Edited at: 6th Jan 2009 23:41
i am trying to make a script to make enities follow the player (like boxes, cyilenders, ect) and when they get close enough they EXPLODE making your health go down



if anyone sees any thing wrong please help
here is a download link:


gmr1923

gmr1923

Attachments

Login to view attachments
Apple Slicer
16
Years of Service
User Offline
Joined: 14th Nov 2008
Location: Oregon, in the rain...
Posted: 7th Jan 2009 02:04
Wow. That sounds creative. "haunted exploding furniture".

Did you look at the default "character" scripts? Maybe if you run those Entities through the "ENTITY CREATOR" you can tell it to act as a person. I did this for a tractor to follow waypoints. As for the explosion....

I'm a Twisted Fire Starter...
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 7th Jan 2009 02:23 Edited at: 7th Jan 2009 02:25
Yes, this can be done. First, you must change the entity's .fpe to include:

ischaracter = 1

Then, in the entity's properties, make sure the entity is dynamic. You may want to play with the weight and friction so it moves easily and smoothly. You'll need to leave physics on. Give the entity a health value other than zero. For the purpose of this script, 100 will do fine. Make sure to select explodable.

Then give it a script like this. The entity probably won't have a view cone like a real character, so you don't need to use that. Just use proximity.



Play with the values to tweak it for you purpose.

Best.

gmr1923
16
Years of Service
User Offline
Joined: 31st Aug 2008
Location:
Posted: 7th Jan 2009 04:23
thanks xplosys the onyl problem i am having now is it goes half way in the groung at start and it doesent explode but it does follow.




gmr1923

gmr1923
gmr1923
16
Years of Service
User Offline
Joined: 31st Aug 2008
Location:
Posted: 7th Jan 2009 04:32
is there any condition or action to make enitiy health go down.

gmr1923
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Jan 2009 04:36 Edited at: 7th Jan 2009 04:37
Quote: "is there any condition or action to make enitiy health go down."

subhealth=x

Look at the script xplosys gave you...

subhealth=100

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 7th Jan 2009 05:08
If the entity sinks into the floor it may be that physics is off. Make sure it is on. If that doesn't work for a particular entity, use raisefactor=50 (or whatever number the entity needs to be raised) in it's .fpe file.

If the entity does not explode, make sure explodable is on and that the entity's strength is not 0 (0=indestructable).

I tested the script before I posted it, and all worked fine in the latest version.

Best.

knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 7th Jan 2009 12:16 Edited at: 8th Jan 2009 13:20
Shouldn't you use the 'destroy' command to destroy the crate/box when they get close enough.
Then just set the explodable setting to true and physics to on.



FPSC Script Debugger (Free)
http://forum.thegamecreators.com/?m=forum_view&t=142689&b=23
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Jan 2009 22:15
Simply destroying the entity will not make it explode, though. You would need to "kill" the entity, which can be done with the subhealth command as xplosys did.


The one and only,


gmr1923
16
Years of Service
User Offline
Joined: 31st Aug 2008
Location:
Posted: 7th Jan 2009 23:44 Edited at: 7th Jan 2009 23:46
ok i upgraded to v113 and it worked fine thanks for your help



and i will be posting this script on the fourms in a little bit i will mention you xpolsys.

gmr1923
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 9th Jan 2009 00:33
Unhelpful Titles

Please do not simply write "Noob Question", "I am a newb", "One Noobie Question", "A question", "Please help", "This isn't working" or anything similar as the title of your post. We have a search facility, and meaningless titles do not help others find answers to their questions. It will also help you to get quicker responses if people have an idea of your thread content.

Login to post a reply

Server time is: 2024-11-24 19:00:21
Your offset time is: 2024-11-24 19:00:21