Scripting Idea/Question

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/
AuthorTopic: Scripting Idea/Question
Shock Trooper
Member # 4445
Profile #0
I'm trying to make a sequence where the party will have to guide another group somewhere, and I have no idea which calls might be useful for that. Don't kill yourself looking for a solution, but off the top of your head, how might you create an outdoor group that would follow the party step for step?
Posts: 293 | Registered: Saturday, May 29 2004 07:00
Member # 4531
Profile #1
Assuming this has to take place in the game and not in a cutscene, I think you should make a custom creature script. You can set the creatures to remain close to the party.

beginstate X;
if (approach_char(ME, 0, 1) > 0)
set_state (start_state);

Will cause an NPC to try to stand right next to the PC in slot 0 if you call state X in the creature script. Anyone else, please correct me if I'm wrong. I've only written one creature script so far.
Posts: 32 | Registered: Saturday, June 12 2004 07:00
Member # 4531
Profile #2
Now, if you want the NPC to actually follow in the footsteps of the party, that would be more tricky. I'd say that you make the NPC completely immoble (mem cell 0 = 2) and then include a script in town state 2 (called each turn) that stores the position of the last character in the party for the last few turns and then uses relocate_char to move the NPCs to those spaces. This would mean having a bunch of variables that store the coordinates of those epaces. Or, if you can make do with just 2 NPCs, you could just add them to slots 5 and 6 in the party.
Posts: 32 | Registered: Saturday, June 12 2004 07:00
Shock Trooper
Member # 4445
Profile #3
Thanks a bunch for your help, but I know about the town stuff. I'm trying to get a group to follow the party around OUTDOORS.

[ Monday, June 14, 2004 20:24: Message edited by: Prophet_of_Doom ]
Posts: 293 | Registered: Saturday, May 29 2004 07:00
Member # 869
Profile Homepage #4
Unless you want them to help out in outdoor combat or something, it might be best to just tell the player via message that the group is travelling with your party.

The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Member # 4486
Profile Homepage #5
Creating a friendly preset encounter with move type 0 will have them follow the party around, but it will be possible to lose them (quite easily). So maybe when the party gets to whereever they're supposed to guide these guys check the distance between them and the party and make them go fetch them if they've lost them.
Posts: 8 | Registered: Tuesday, June 8 2004 07:00
Member # 2820
Profile #6
You could make them special monster groups that hunt the party, although you'd have to make sure that they don't attack and that they dont't get in the way. But they won't follow you out of their specific outdoor area because that's where their script is.

Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
Alorael: War and violence would end if we all had each other's babies!
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Shock Trooper
Member # 3022
Profile #7
A hackish way could be to have a terrain feature that looks like your group, and a script that repositions the tile with each step you take. That's what I think, anyways.

EDIT: I've experimented a bit, and this actually seems to work! Right now, I'm seeing if I can make a mobile town. (BTW, remember to add a script too to check if the party is adjacent to the object. I don't think there is a way to set nodes on the fly. In fact, I don't know what this does to nodes at all.) The Flying Fortress of FZ, here we come!

EDIT2: Hmm... not possible, most since I can't find a call to move from outdoors to town. Still, I might be able to make mobile teleport gates.

[ Thursday, June 17, 2004 16:37: Message edited by: FZ ]
Posts: 269 | Registered: Saturday, May 24 2003 07:00