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 / plrwithin=50 ?

Author
Message
flashing snall
13
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 1st Dec 2005 00:32
i have question, i made ascript, it was this

;Artificial Intelligence Script

;Header

desc =withindeath

;Triggers

:state=0,plrdistwithin=50:state=1
:state=1,plraddhealth=-100:state=0

;End of Script


it doesnt do anything. I wanted to have a spike wall kill if you got to close, whats wrong with it?

dont assume cause ull make an ass out of you and me!
dpharaoh
13
Years of Service
User Offline
Joined: 2nd Nov 2005
Location: SouthEast MA
Posted: 1st Dec 2005 00:33
Did you put it as the main?
Sunflash
14
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 1st Dec 2005 01:26
I think it might be because your telling it to ADD health. Look for a different command to use instead.

When FPSC gets good enough, lets make a Redwall game!
Conjured Entertainment
AGK Developer
13
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 1st Dec 2005 01:29 Edited at: 1st Dec 2005 06:08
That's not wrong, because he is adding a negative and thus subtracting.
plraddhealth=-100 is right. (you overlooked his minus sign Sunflash )

State=1 has an error.
The second colon is misplaced.
plraddhealth=-100 is an action, not a condition.

Try this instead.



He may die twice though, because it is still taking away health while you are in your death sequence.

EDIT ( I tested it, and I was wrong about that. Disregard the following code: )

This will fix that:




Now, it should continue to take health until he is dead.
Once dead, it waits until the death sequence is over to reset it.
The only bug would be if you made his spawn at the wall, so don't.


I just wrote this off the top of my head, if it doesn't work then I will test and tweak.





Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike
flashing snall
13
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 1st Dec 2005 02:35 Edited at: 1st Dec 2005 03:54
hmm, the last one gets a bug when i test it, and dang so does the first one!


EDIT: no, they probly work fine, my fps is being a

sorry for WHAT was here, i got kinda pist...

dont assume cause ull make an ass out of you and me!

Attachments

Login to view attachments
flashing snall
13
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 1st Dec 2005 03:54 Edited at: 1st Dec 2005 03:55
uh, i edited this, the model i dont know how to take out...

dont assume cause ull make an ass out of you and me!

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
13
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 1st Dec 2005 05:42 Edited at: 1st Dec 2005 06:04
I tested both with my [i]Baseball[/i], and they both worked fine.

I was wrong about the first one killing you twice using plrdistwithin. (I had plrwithinzone on the brain)
Disregard the second one.

Quote: "i dont know how to take out."


Take the model out of FPS?
Once you put it in the Library, you can't get it out.
Only load the models that are going to be in your game when you are building it.

I made a Test Level for testing my stuff.
Its good to test anything before you load it in your Game's Library.
I never test in my Game's Levels anymore. I learned that the hard way.




Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike

Login to post a reply

Server time is: 2019-08-22 10:28:01
Your offset time is: 2019-08-22 10:28:01