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 / Kicking Enemy (Can I get help with this script?)

Author
Message
97k
13
Years of Service
User Offline
Joined: 24th Jan 2011
Location:
Posted: 9th Apr 2011 22:15
So ive tried to script a simple script, which is when you press the "F" key. The enemy will move backwards a few units. Ive tried using "scancodekeypressed=33" for the F key, and ive also scripted it so that state=1 is greater than 5 units away. and state=2 is less than 5 units away. I dont want the animation for my foot kicking the enemy,(because I suck at modeling and animation )
Just so that when I press "F" he will move back.
Ive just started scripting about 3 months ago but I cant really get this one. Can anyone help me?
Thanks in advance,
97k
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 9th Apr 2011 22:17
Can you post the script?

Srry about my english im from sweeden
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 9th Apr 2011 22:28 Edited at: 9th Apr 2011 23:01
So you've got this:


97k
13
Years of Service
User Offline
Joined: 24th Jan 2011
Location:
Posted: 9th Apr 2011 23:35
no I have this
:state=1;plrdistwithin=500:state=2

:state=2;scancodekeypressed=33:moveback=200
Anigma
13
Years of Service
User Offline
Joined: 25th Mar 2011
Location:
Posted: 10th Apr 2011 01:35
Quote: "no I have this
:state=1;plrdistwithin=500:state=2

:state=2;scancodekeypressed=33:moveback=200 "


Couple things:

1. moveback doesn't work, nothing happens when I try that command. Same with forceback. However, forcebounce does.

2. In the above code, you've got semicolons where commas should be.

This script can serve as a starting point for what you want to do:



You'll need to add code to play the appropriate "ow, my face" animation and sounds, but this should get you started.
97k
13
Years of Service
User Offline
Joined: 24th Jan 2011
Location:
Posted: 15th Apr 2011 04:13
Tks Anigma! Even though your script does have a few bugs, it accomplished more than mine.[quote]In the above code, you've got semicolons where commas should be.

Tks for pointing that out
Anywho, thanks for the help every one for simply replying to this thread,I guess ill just have to toy around with it and see what I cant do.

Thanks
97k
13
Years of Service
User Offline
Joined: 24th Jan 2011
Location:
Posted: 15th Apr 2011 04:14
oh oops, that last post, the entire thing was the quote sry

Login to post a reply

Server time is: 2024-11-24 08:17:28
Your offset time is: 2024-11-24 08:17:28