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 / How do you use x and y values?

Author
Message
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 11th Apr 2012 21:19
What is the syntax when using x and y values in a condition?

For example, the radarequal and radargreater conditions have x and y values, so how do you actually write it in a script?

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 11th Apr 2012 21:23 Edited at: 11th Apr 2012 21:24
A space between the values.

radarequal=20 1

This checks to see if range is equal to 20.

radarequal=20 0

This checks to see if range is not equal to 20.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 11th Apr 2012 21:36 Edited at: 11th Apr 2012 21:39
Thanks Flatlander. Would the same apply to spawnsgreater and spawnsleft?

I'm trying to get something to spawn after killing an enemy, which respawns after dying 10 times, without using variables, since I still haven't learnt how to use them yet!

(So, after the enemy has spawned and dies 10 times, the other entity spawns).

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 11th Apr 2012 23:09
Yes.

If he has 10 spawns, then the command would be spawnsgreater=10 1

I didn't even realize there was this command. This can be quite useful and a lot easier than using variables. However, the only way to use variables is if you can be sure when the character actually respawns. I'm not sure if there is a command that checks for that?

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 11th Apr 2012 23:18
Thanks again, I'll test the scripts I'm writing, then I'll publish them if they work

Quote: "However, the only way to use variables is if you can be sure when the character actually respawns. I'm not sure if there is a command that checks for that?"


I've no idea either, even though I've had variables explained quite clearly to me by BlackFox, they still go right over my head at the moment!

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 11th Apr 2012 23:36 Edited at: 11th Apr 2012 23:37
Your welcome.

There are two variable systems within FPSC and and a variable system in RPGmod. There are also system variables which adds another dimension but also more confusion.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 12th Apr 2012 00:04 Edited at: 12th Apr 2012 00:05
At some point I will learn about variables, both stock and RPG.

Anyway, I got the scriots working, but had to use the 'spawnsleft' condition instead of the 'spawnsgreater'.

Here's what I came up with, and how to set it all up;

Assign the following as your enemy ai's destroy script;



Then enter the entity you want triggered in the ifused field. Lastly, Set spawn at start to no, max at any time to 1, maximum spawn to however many times you want it to respawn, spawn after delay to no and spawn when dead to yes.

For the entity (in my case, I wanted a Win Zone to be spawned) you want spawned, assign this to its aimain filed;



Note, if you want an entity to be spawned, and not a trigger zone or win zone, you would type 'runfpidefault=1' instead of 'runfpi=plrinzone.fpi'. Or, just replace 'plrinzone.fpi' with whatever script you want to run.

I hope that's easy to follow.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 12th Apr 2012 00:18
About needing to use spawnleft, that's understandable when I think about it. You would have needed to set the character to spawn 11 times and then check for greater than 10. If set to the ten then the character is killed and would never return true for greater than 10.

I can see using the greater than before the character dies for doing other things or still spawning characters before the current character is killed.

Anyway, this was easy to follow for me.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 12th Apr 2012 00:36 Edited at: 12th Apr 2012 00:38
Quote: "About needing to use spawnleft, that's understandable when I think about it. You would have needed to set the character to spawn 11 times and then check for greater than 10. If set to the ten then the character is killed and would never return true for greater than 10.

I can see using the greater than before the character dies for doing other things or still spawning characters before the current character is killed."


Yes, I'm sure they'll be situations where I'll use both conditions.

Quote: "Anyway, this was easy to follow for me."


lol, sorry, that was aimed at other people who might be following the thread

Meows
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 14th Apr 2012 20:17 Edited at: 14th Apr 2012 22:34
Quote: "bruce3371 lol, sorry, that was aimed at other people who might be following the thread"

Like me,
Thanks
Flatlander and bruce3371

Humm, not getting it.
Assign the following as your enemy ai's destroy script;


Ok did that.
For the entity (in my case, I wanted a Win Zone to be spawned) you want spawned, assign this to its aimain filed;



OK did that. But why? I do not see a option in the WinZone to make it active or not active.

So i try it with a Character. and put.
Note, if you want an entity to be spawned, and not a trigger zone or win zone, you would type 'runfpidefault=1' instead of 'runfpi=plrinzone.fpi'.
Or, just replace 'plrinzone.fpi' with whatever script you want to run.

and nothing happened.

I must be totally brain dead. As the winzone works all by it's self, wait let me put the code in the winzone. sec please.

Okies. here we go. Great post. I finally got it.

For brain dead monkey's like me.
This is great... wow I have to go rework all games.

Place a trigger. put in the playerinzoneactiveused.fpi
add a enitiy and make if used in trigger and enitiy name the same.
In enities destroy script put
DestroyAndSpawn.fpi



Now in the WinZone MAIN script
put
WinZoneSpawn.fpi



There you go. You can have multiple win zones and this is great for resetting zones when the player dies.

I think this would work with this better than the way I do it now.
The player dies. and for some reason all your scripts fail to work from a Player Checkpoint, well they sometimes fail for me.
So the first enemy they confront at game start has low hitpoints,
and a Death script that spawns a character after a LONG delay with
a LONG Spawn Life, like 20 minutes or so. This character has this
death script that activates a trigger that restarts game play to
the point the player died at.

All you need is a small script to count down checkpoints the player has passed in the game to know where to stop the restart script.
Ask Ched80 he can make anything.

Thank you Lee for the game and programming and Flatlander and bruce3371 for this game changing thread.

Where can we find more information on what pawnsgreater and spawnsleft and radarequal and radargreater actually do?
Many thanks.

Life is a short trip to another world
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 14th Apr 2012 22:47
Click on the download button to download an official list of commands by Scene Commander. It is a PDF.

Attachments

Login to view attachments
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 14th Apr 2012 22:50
Because we only get one download option per post, this download is of Ched80's unofficial complete script syntax list iss4. Also, go to the FPI EditPad thread and find the updated version of all the commands through v1.19. Should be the very last post of that thread or close and is in the download.

Attachments

Login to view attachments
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 15th Apr 2012 00:12
Glad the scripts work for you

Login to post a reply

Server time is: 2024-11-23 23:52:55
Your offset time is: 2024-11-23 23:52:55