HOT DAMN! A possible work-around for the PC -> NPC bug!

Mapping & modding Fallout Tactics and reviewing maps thereof.
Post Reply
User avatar
Max-Violence
Wandering Hero
Wandering Hero
Posts: 1221
Joined: Thu Apr 18, 2002 4:15 am
Location: In my own personal vault
Contact:

HOT DAMN! A possible work-around for the PC -> NPC bug!

Post by Max-Violence »

Before I get on with it, I have to tell you fellas that I haven't actually tried what I'm about to go into... yet. I'm ~50% done with the tiles for my current map (Revenge1), so I won't be able to test it fully for a while yet.

Now that that's outta the way, let me enlighten thee.

We all know of the problem actors have when they go from Human control to AI control with regards to waypoints (i.e. they don't use 'em). Well, I think I've come up with a not-too-ugly work-around to get 'em using their waypoints like good little boys and girls.

Basically, it uses the "clone-swap" method, but with a twist.

The "simple" explanation: The Condition(s) are met for the PC to go to an NPC. Using a Change Player action followed by a Deactivate Player action, the PC is "removed" from the map. Then, using Set Waypoints, the NPC clone of the PC is placed in the map. When the Condition(s) are met for the PC version to "come back," a Move Unit action moves the unit to the same Waypoint that the clone was at when the Condition(s) were met, a Deactivate action is used on the clone, then a Set Stationary action is used to place the PC back in the map. Finally, a Change Player action is used to put the PC back to Human control.

The only possible serious problem I can think of is if the game "strips" the PC of items when Deacivated, but hopefully not. I'm pretty sure a Move Unit action can Move a Deactivated player index (since it can move an "off" light entity... I think. Of course, that's object script state and not deactivate/actuvate... I know Move Unit can move an invisible entity (lights, WP's, spawns, etc.).

The real trick here is to ensure the PC version is placed exactly (or pretty close) to where the NPC version was when the Condition(s) were met.

Again, I haven't tested this, so I can't be 100% sure it works. If someone were to be so kind as to find out for me (and, more importantly, the rest of the FOT mapping community, however small it may be).
Closing our eyes forces us to look
At the darkness inside.
Our emotions always find us
Regardless of where we hide.

maxviolence@hotmail.com
http://mvmaphub.duckandcover.cx <--- Updated July 10th, 2006
User avatar
Max-Violence
Wandering Hero
Wandering Hero
Posts: 1221
Joined: Thu Apr 18, 2002 4:15 am
Location: In my own personal vault
Contact:

Post by Max-Violence »

An easy way to make sure the PC version gets re-inserted where the NPC version was is to use Zones along with your Condition(s). Make a small zone surrounding ever waypoint entity and add a Quantity - Unit Alive In Zone condition to trigger the switch. Of course, you'll need one trigger for every zone, but that's what Copy Trigger is for :mrgreen:
Closing our eyes forces us to look
At the darkness inside.
Our emotions always find us
Regardless of where we hide.

maxviolence@hotmail.com
http://mvmaphub.duckandcover.cx <--- Updated July 10th, 2006
User avatar
Jimmyjay86
Hero of the Glowing Lands
Hero of the Glowing Lands
Posts: 2102
Joined: Thu Apr 18, 2002 4:02 am
Location: Wisconsin
Contact:

Post by Jimmyjay86 »

MV, I'm not sure why you are deactivitating the character. Is it because of the tag name problems?
User avatar
Max-Violence
Wandering Hero
Wandering Hero
Posts: 1221
Joined: Thu Apr 18, 2002 4:15 am
Location: In my own personal vault
Contact:

Post by Max-Violence »

No, it's so the human player doesn't get confused when two versions of the same actor are in the same map at the same time.

Technically, using Move Unit instead of Deactivate could work, but the actor will try to get back to where it was Moved from, and the map design might not allow for a "jail" for the actor(s).

Tag Names wouldn't be the problem simply because you could Tag the PC version as Bob-PC and the NPC version as Bob-NPC.

Also, Deactivate would work better in TB games, since the player wouldn't have to wait for the actor to take its turn.
Closing our eyes forces us to look
At the darkness inside.
Our emotions always find us
Regardless of where we hide.

maxviolence@hotmail.com
http://mvmaphub.duckandcover.cx <--- Updated July 10th, 2006
User avatar
Jimmyjay86
Hero of the Glowing Lands
Hero of the Glowing Lands
Posts: 2102
Joined: Thu Apr 18, 2002 4:02 am
Location: Wisconsin
Contact:

Post by Jimmyjay86 »

Just "Move Unit" the guy to a 4-square piece of floor tile separate from the rest of the map so he doesn't try to get back. That is what I do. You can move it far away out of sight behind a wall too if you want. Or move it to a higher or lower elevation.
Our Host!
Post Reply