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 / SetTarget action clarification, please

Author
Message
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Oct 2007 07:15
The way the manual states how this action works is a little vague:

Quote: "SETTARGET - sets the internal target for the entity, follows ‘target’ conditions"


Since it doesn't have the "=X" in the field, does that mean it knows what to set it's target to? If so, what does it base this on? If I were to put this into a script:



What would the entity's target be?

What if I wanted to TELL the entity what to target? Would this code work the way I think it'll work?



If someone could answer these simple, yet slightly confounding question for me, I'd be greatly appreciative.


The one and only,
~PlystirE~

In Soviet Russia, road forks you!

Mom: I may not be the alpha and omega, but I can sure as hell be yours!
pigs can fly
18
Years of Service
User Offline
Joined: 20th Aug 2006
Location: Luxembourg
Posted: 4th Oct 2007 10:02
Yeah, I'd like to know that too


The Swarm of flying pigs is coming...
Killer&Slaughter Machines Pack too!
Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 4th Oct 2007 11:57
I'm pretty sure you put the name of the entity... so if the entity you want to set as the target is called "target001"... then you put
SETTARGET=target001

But my scripting is not that great... I'm sure someone else could explain it better...

[center]
Veron
18
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 4th Oct 2007 13:48
Yeah, my understanding of the command is the same as Thraxas'.


Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 4th Oct 2007 15:27
I think you'll find that the settarget command sets the entity to target the player.

You cannot define a variable for it (it won't recognise settarget=x)

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Oct 2007 02:02
Thanks, butter fingers. I figured as much.

However, I discovered that it doesn't always set the target to the player. It sets the target to the entity (or player) that it last ran a check on in a condition statement.

So if the script runs this:



If the "entitywithinzone" returned true, then the settarget will set that entity as it's target! This can be a little troublesome to purposefully have an entity target another, since most FULL levels are going to be littered with entities.

I just recently found empty's mod and started playing around with it. Using the script commands that it added, I can do just about everything that I want to do.

Only problem is, it has some graphical issues, and I'm still trying to see if the gameplay boost is outweighing the graphical anomalies accompanied with it.


The one and only,
~PlystirE~

In Soviet Russia, road forks you!

Mom: I may not be the alpha and omega, but I can sure as hell be yours!

Login to post a reply

Server time is: 2024-11-23 22:26:26
Your offset time is: 2024-11-23 22:26:26