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 / Make player undercover

Author
Message
Jesper
17
Years of Service
User Offline
Joined: 14th Oct 2007
Location: Hämeenlinna
Posted: 4th May 2008 12:32 Edited at: 4th May 2008 12:34
I made one script. If ypur objective is steal enemy uniform, you can make player ''use it''. Just make uniform key to door, behind door is winzone, and in next map use this code



to enemy MAIN AI. Then, if you don't use weapon enemies ''think'' that you are one of them and they don't shoot you. Put if you use weapon, they shoot you.

I don't know work it, you can test and tell what is wrong.

freewebs.com/jespergames
Visit there!
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 4th May 2008 12:49
You could also use a variable system, if the player has picked up the suit, Var1 becomes 1.
If Var1 is 1, then if the key "f" is pressed(As example),Var2 is 1. If var2 is 1, then enemies will not attack you unless you are armed. If you press F again, Var2 will become 0 again.

Its a bit more complicated, but it is a little better.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th May 2008 15:20
Well, for starters, you're trying to use "plrhasweapon" as an action. You can't do that.

Second, you have state=1 and state=2 behind semicolons in the first two lines of the script. Not sure what you were trying to do there.

You need to have your conditions and actions properly seperated for it to work.


The one and only,


Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 4th May 2008 17:39 Edited at: 4th May 2008 17:41
What Plystire said. The following line is also a logical error.

:state=1:plrdistwithin=500,settarget

You are making plrdistwithin=500 an action. How do we know?

The colon syntax is an if/then syntax in most other programming languages. The first colon represents the "if" part or the condition. All conditions are then separated by a comma. The next colon ( : ) is the "then" part or the actions. All actions are separated by a comma. In order for the actions to be executed ALL of the conditions must be met or must be true.

@POD, nice suggestion using variables.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 5th May 2008 03:41 Edited at: 5th May 2008 04:08
Quote: "You could also use a variable system, if the player has picked up the suit, Var1 becomes 1."

I was thinking of using a similar method for globalvar=5 for creating armor.
Whereas, the armor value could be added back to the player's health whenever a loss of health took place...
:state=0:globalvar=5,state=1
:state=1,shotConditionsInYourCustomScript:plraddhealth=-50,state=2
:state=2,vargreater=50:plraddhealth=49,state=3
:state=2,vargreater=40:plraddhealth=40,state=3
:state=2,vargreater=30:plraddhealth=30,state=3
:state=2,vargreater=20:plraddhealth=20,state=3
:state=2,vargreater=10:plraddhealth=10,state=3
:state=2,varless=1:setvar=0,state=3

This would be an easy way to make a 50 point damage shot have 6 different effects on the player.
The number of effects would be limited only to the number of values you accept for the armor.
So, it could be on any scale of 0-99, or higher.
You could also decrement the armor value with a timer or with further actions on damage such as editing state=1 in the above example as follows...
:state=1,shotConditionsInYourCustomScript:decvar=1,plraddhealth=-50,state=2


Post Script

Here is your


...with all the commas colons and simicolons in place. (I think)

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th May 2008 06:24
@Conjured:

The first line "activate", you have to give that a value

Also, I may be a little confused, but I don't see how the player will get shot at if they are holding a weapon.

And was the "plrhasweapon" condition added in V108 or a V109 Beta?


The one and only,


Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 5th May 2008 07:16
Quote: "@Conjured:

The first line "activate", you have to give that a value "

Dude, I am well aware of that.

I was not re-writing the script for him to correct his logical errors.
I was only correcting his commas, colons, etc.

You have to address him with any code errors or changes.

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th May 2008 09:44
Okay, but my question still remains valid towards anyone who has an answer.


The one and only,


Login to post a reply

Server time is: 2024-11-24 07:18:27
Your offset time is: 2024-11-24 07:18:27