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).
HOT DAMN! A possible work-around for the PC -> NPC bug!
- Max-Violence
- 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!
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
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
- Max-Violence
- Wandering Hero
- Posts: 1221
- Joined: Thu Apr 18, 2002 4:15 am
- Location: In my own personal vault
- Contact:
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
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
- Jimmyjay86
- Hero of the Glowing Lands
- Posts: 2102
- Joined: Thu Apr 18, 2002 4:02 am
- Location: Wisconsin
- Contact:
- Max-Violence
- Wandering Hero
- Posts: 1221
- Joined: Thu Apr 18, 2002 4:15 am
- Location: In my own personal vault
- Contact:
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.
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
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
- Jimmyjay86
- Hero of the Glowing Lands
- Posts: 2102
- Joined: Thu Apr 18, 2002 4:02 am
- Location: Wisconsin
- Contact: