Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

How to make an NPC walk and fallow the main character when it moves?

  • #1, by AkcayKaraazmak 12 years ago Zitieren
    Hi mates, any ideas for how to make an NPC in a scene to fallow the main character when the main character moves? Also when main character gets into next scene how we can also have the same NPC in the next scene with the main character?

    Cheerssmile
  • #2, by afrlme 12 years ago Zitieren
    You could use the chase character action part. In an at begin of scene action of the next scene: set the npc to the scene & call another chase character action part.

    Leave the execute action on character catch (whatever it's called) empty so that no action is performed when npc reaches character based on radius set. I forget exactly how it works as it's a long time since I looked at that action part.

    P.S: it might be a good idea to wrap the set character to scene action part in a:
    -- action parts
    if character "character_name" is on current scene
    else
    set x character to x scene
    end if
    
  • #3, by AkcayKaraazmak 12 years ago Zitieren
    THank you so much Lee! You are always been a life saver grin ... Ok I'll use chase function but how and where? On main character or npc's actions?
  • #4, by afrlme 12 years ago Zitieren
    hmm in a scene action or at begin of scene action under: character > chase character: specify which character should chase current character. use the range to stop npc from getting too close. leave the action empty.
  • #5, by AkcayKaraazmak 12 years ago Zitieren
    It worked perfectly!!! Thank you so much mate! smile
  • #6, by Machtnix 12 years ago Zitieren
    Verdammt. Ich hatte drei neue identische Folgecharakter angelegt, die jedesmal neu eingesetzt werden. Aber es geht ja sooooo einfach, rabäääh... :-(

    Machtnix
  • #7, by afrlme 12 years ago Zitieren
    Verdammt. Ich hatte drei neue identische Folgecharakter angelegt, die jedesmal neu eingesetzt werden. Aber es geht ja sooooo einfach, rabäääh... :-(

    Machtnix


    er... grin

    There's always a way! http://fc05.deviantart.net/fs10/i/2006/088/b/a/_shakeshark__by_Taimotive.gif
  • #8, by Machtnix 12 years ago Zitieren
    Yes, of course. But: I did the experience that's my self-founded solution only worked for this one, only my special problem. Not a good style of programming. I created a down-counter (for a mini-game with a plant which eats flies). It works. But if I want more flies I have to build new actions and a lot of writing (every fly is an action and an object). This counter only works for 10 flies. I mean, that's why I will never be a good programmer... ;-)
  • #9, by afrlme 12 years ago Zitieren
    Hmm looks interesting. It's a shame we can't create destructive elements with Visionaire Studio, as it would make this a doddle to achieve.

    I believe you could do this with animations & a couple flies or so & have them randomly generate how many times the animation should loop etc.

    How does the mini-game work exactly? (mind we should probably be talking about this in another thread).

    Also, never say never. Bit of patience & effort. Hell when I joined vs forum 2 years back I had never even heard of Lua script. I hadn't programmed/scripted (other than a bit of web design) in over 10 years by that point. & within a couple months I picked up the basics of the language & look at all the crazy shit I've managed to write & share since - yes, even with my terrible terrible terrible memory!