Jump to content

Announcing our new website

To find out the latest about our new website, visit Game Dev Unlimited

- - - - -

Party Member Follow


  • You cannot reply to this topic
4 replies to this topic

#1 WoohaDude

    Newbie

  • Member
  • 7 posts

Posted 11 October 2011 - 07:59 AM

So I was curious if anyone had a script that lets a party member follow you .. but not just 100% copy your movements, like most caterpillar scripts. I'll give you an example.



See how she follows him, but not to a T? I love that. Seems so much more realistic. Was curious if anyone had a script like that. Thanks.

Edit: Got it figured out ... but my solution's laggy. Using a path finding script to have the NPC use in a parallel process .. but it starts to get laggy if the path gets complex, since it's called every frame.

Edited by WoohaDude, 11 October 2011 - 11:28 PM.


#2 Zeriab

    Loyal Member

  • Member
  • 186 posts

Posted 11 October 2011 - 04:27 PM

I think there is a script called Squad movement or something like that by Near fantastica which may do you want you want

#3 WoohaDude

    Newbie

  • Member
  • 7 posts

Posted 11 October 2011 - 05:58 PM

This may actually be easier than I was thinking. I can just make an event, make it parallel process, and have it use a path finding script to constantly find a way to get to the hero, and then stop if it's within a certain distance.

But, I'd have to make this event on every map I wanted them to appear on. Any way to script a map to copy an event from another map, or something? So I could have a map to store the event to be copied, and I can make any changes to it there, and have the script automatically copy it over for me, per map?

#4 Kiriashi

    Activity Whore

  • RMXPU Legend
  • PipPipPipPipPipPipPipPipPipPip
  • 4,486 posts

Posted 11 October 2011 - 06:58 PM

View PostZeriab, on 11 October 2011 - 04:27 PM, said:

I think there is a script called Squad movement or something like that by Near fantastica which may do you want you want



Lmao!!! Zeriab! *hugs*


I just got done telling someone else in another topic that you left the RMXP scene and probably wouldn't respond to your three year old topic.


EDIT: Wooha, your fog is static. Might want to fix that.

#5 WoohaDude

    Newbie

  • Member
  • 7 posts

Posted 11 October 2011 - 07:46 PM

View PostKiriashi, on 11 October 2011 - 06:58 PM, said:

Lmao!!! Zeriab! *hugs*


I just got done telling someone else in another topic that you left the RMXP scene and probably wouldn't respond to your three year old topic.


EDIT: Wooha, your fog is static. Might want to fix that.

Oh, that's not my game. Was a game I found on youtube that had what I wanted.

Okay, so I've been trying my idea of just copying an event from another map. Or, just loading the events from a specified map, and adding that event to the Game_Map's events, in the setup function. Like so:

    @followerMap = load_data("Data/Map009.rxdata")
    @events = {}
    for i in @map.events.keys
      @events[i] = Game_Event.new(@map_id, @map.events[i])
    end
    #add Althea to the party
    @events[i+1] = Game_Event.new(@map_id, @followerMap.events[1])

which does in fact add the event. But, it's not responding to any move commands. It just sits there. And I'm completely stuck on why. The copied event is a parallel process, just for now, using a "step towards player" command.

Any ideas?

Edit: Appears to be linked with it being a parallel process. If I set a move route in the event's autonomous movement settings, it works fine.

Edited by WoohaDude, 11 October 2011 - 08:32 PM.






0 user(s) are reading this topic

members, guests, anonymous users