(Resolved) NPC Eventing

Started by DeXuS, January 10, 2011, 09:11:32 pm

Previous topic - Next topic

DeXuS

January 10, 2011, 09:11:32 pm Last Edit: February 08, 2011, 02:22:22 am by DeXuS
I need a basic NPC eventing tutorial, All the ones  I have found are either not what I need, based on x y cords, or missing the example photos and not at all decriptive...   :<_<:

Basiclly I am to the point where I need to add npc's and I am having a time of it.  They do not wait for moveds completion despite it being in the event, and the same messages I made them say keep poping up over and over and over and over and over and...  oh right, to the point.

Anyone have any tuts laying arroung that can help me out?  Or anyone feel like just having a helpful conversation with me?  I'm not doing any major eventing at the momment just some basic (After you talk to the drunk and he bum's 5gil, he slurs *Thankz mistah* and runs off to buy some more beer.

I tried to piddle with one from ForeverZer0's CCTS demo but it kept freezing the system...   :O.o:

Oh, I also have managed to make an npc that keeps walking and never stops...  AND HE WAS SUSPOSED TO!!!

:oops:

WhiteRose

I can do this; I'm booted into Linux at the moment, so it might not be until tomorrow that I can get around to it, but I'll make something and post it.

If you just need quick help with something, contact me on MSN and I'll lend you a hand. I'm usually available weekdays after 5 or weekends.

tSwitch

What exactly are you attempting?


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: tSwitch.us | Twitter | Tumblr

DeXuS

January 10, 2011, 09:45:17 pm #3 Last Edit: January 11, 2011, 01:44:15 am by DeXuS
Quote from: WhiteRose on January 10, 2011, 09:29:08 pm
I can do this; I'm booted into Linux at the moment, so it might not be until tomorrow that I can get around to it, but I'll make something and post it.

If you just need quick help with something, contact me on MSN and I'll lend you a hand. I'm usually available weekdays after 5 or weekends.


Thanks WhiteRose, you can do it at your own time, I don't like to pressure anyone.  Besides, I waited this long to get started with NPC eventing so I can wait a day or so more.  (What version of linux do you use?  Looking for a comparrison of ubuntu to mint. I have ubuntu, looking into mint)

Quote from: NAMKCOR on January 10, 2011, 09:31:19 pm
What exactly are you attempting?


Well, I have been working on my project for a while now. (Mainly editing tile sets and sprite sheets and so forth.) and I think that it is about time that I get on with some eventing.  Thought I would start by learning to do it first with the simple NPC events and work my way up as I learn.  But all I have done for the pasy 6 months is mapping, editing and planing and waiting for a Dyslexic friendly tutorial with lotsa pictures as an example. It is time for me to get all the people standing around on the map to do stuff...  lol   (It's funny...  I made a perfectly good multi floor elavator with no problem but I can't make a dag gum squrrle run/play with out the system freezing.)

SilverShadow737

This seems easy...
Is this what you mean?

1st page:
Spoiler: ShowHide


The autonomous movement should be set to random if you want the bum to meander about randomly.


2nd page:
Spoiler: ShowHide


You probably want to use parallel process here, autorun will prevent the player from moving though.
You don't have to turn off self switch A but I like to do it.
If you want the text to show after he runs away, put the text in the next page with parallel process and then put another blank page after that (make sure to manipulate switches so it advances the page after the text).


3rd page:
Spoiler: ShowHide


Sorry if you feel like I'm stepping on your feet WhiteRose, I just wanted to contribute for once.   :^_^':
Ginyu Force Rules

DeXuS

January 10, 2011, 11:20:30 pm #5 Last Edit: January 11, 2011, 01:47:37 am by DeXuS
 :twitch:  Mine looks like that (the moving part anyways) I was only using the bum as an example...  lol   The only bums in my project are zombies...   :O.o:  Still it's nil, yet I copy yours word for word and it works...  but my movements are more complicated.  The NPC has ALOT of stuff to move around.  I will upload some screen shots to show you when I get on a wifi tomorow, Not gonna do it on dial up...  will take untill tomorrow to do upload them.

Ohh...  nvm.   I just got him to act semi right.  He moves, But only when I step on a set event spot that triggers a switch...  If I try and talk to him normally (With out the switch) rmxp crashes...   ARRRRGGGG!!!    :argh:

Starrodkirby86

It shouldn't crash unless there's some scripting error, shouldn't it? O.o

What exactly is this event in question?

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




DeXuS

Well, so far I have been making a game with no events other that small stuff... Doors, Elavators, etc...
Now i'm at the point where I need to make the NPC's...  And I keep getting the ID10T Error...   Just need some basic help with advanced eventing so I can cut a demo of this thing sometime this year, lol

Basically, It is 2012 (Projected release date) and zombies have ravaged the world.  You are part of a Home grown anti zombie extermination crew who stumbles on a possible cure know by the elusive creator of the virus Dr."insert a name here".  Since the virus was not made as his intentions, he want's to destroy it all, all of his work including the cure. Stricken with greif he is litterally out of his mind.  You have to fight your way across a city full of zombies and hunt down the Dr. before he destroys the only chance the world stands.  On your journy, you encounter tons of survivors and mutated zombies that are getting deadlier, smarter and more vicious, Collect new weapons, Visit diffrent places in the city and aquire new team members.   (Estimated hours of game play:24 straight hours.)

Starrodkirby86

Nice. Hmm...

Well, you haven't really told me anything about the actual event, and more about a synopsis of your project. xD While this may help get the atmosphere of what sort of NPC you're trying to make, this does little to help know what the actual error is.

Uhhh, what is this idiot error exactly then? xp


You said RMXP crashes. The event system is pretty controlled and shouldn't create program-crashing errors unless you start using scripts here and there. What's your event? ._.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




DeXuS

Quote from: Starrodkirby86 on January 11, 2011, 02:30:07 am
Uhhh, what is this idiot error exactly then? xp


You said RMXP crashes. The event system is pretty controlled and shouldn't create program-crashing errors unless you start using scripts here and there. What's your event? ._.


xD  sorry, Misunderstood that as direct and simple as it was, lol

Trying to get someone to aproach me, tell me "My daughter is on the top floor and the power to the elavator needs to be restored, but to reach the switch you need you need to go through the back rooms and kill the zombies to get to it." then he walks me to the door, unlocks it where it was previously locked, and I go in.  Upon return if switch is not on, he says (Dont get my hopes up like that) asks if I am hurt and heals me if I am and sends me back in.  After the switch is thrown and power is cut back on to it, he is no longer there, but it two rooms over and coming out of the elavator out of breath rasping. "Daughter, Zombies, everywhere..." and passes out. So the hero heads into the elavator to kill the zombies on the floor(s) above.   

And it is an ID #TEN T error, my brother who is a computer repairman  says it all the time.  "Had another ID10T error today...)  but it does mean idiot, you just can't bill for it so you have to write it on the bill in some way, lol

SilverShadow737

Where in the event does the game crash?
Maybe you could show us pictures of your event's pages?
Ginyu Force Rules

DeXuS

January 12, 2011, 03:49:12 am #11 Last Edit: January 12, 2011, 09:23:18 am by DeXuS
There is no event there. I checked the switch by activating it via another npc and it runs smooth but when you talk to him it crashes.  There are no scripts in it yet but I do plan to use ForeverZer0's weather script.  From the test game it looks like it runs perfect, but it is not in the scrips for this game. So basically, The script is simple enough.

Page 1
--------
preconditions=none
movement pattern=none
options=no animation
trigger=action key
event commands=message: \c[1]Alex: \c[0]I need to rest up a bit...

Page 2
--------
Works, This switch is not even activated, it is page 1 that freezes. But in this event he takes 7 steps fowards and tells you his daughter is on the top floor with zombies and the elavator has no power.

So why it freezes I don't know.  Think I will back up the game folder and re-install rmxp if it keeps doing it just to see of it helps.

But, this is origianlly about a npc eventing tutorial...  I still need this guy to move on page 3 (Deleted because he keeps walking and does not stop)

***EDIT***
Well crap...   Didn't have to re-install.  I have re-done the npc event page one and copy/pasted page 2 to the new event...  And now it does not freeze.  What's that about?  Starting to think my pc is on the fritz... Figures as it is from 2004.  :<_<: (Ruddy hand me downs)

Oh well, Still need the eventing help.  The guy still keeps walking till he hits the wall. (Not where he is susposed to go.)

nathmatt

make sure repeat action isn't checked
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


SilverShadow737

Some options:
Are you using autonomous movement, or set move route?  You do not want to use autonomous.
Try putting in some text, if he is constantly repeating the text before/after moving, it means the event is just cycling over and over.
You may have forgotten to insert a new page and or activate that page after the event finishes page 2.
You may have also made him walk too far in the move route.
If none of this works you may want to try remaking the event like you did with the first page.
Ginyu Force Rules

DeXuS

January 12, 2011, 08:35:43 pm #14 Last Edit: January 12, 2011, 08:48:24 pm by DeXuS
*Facepalm*  Errr...  I had autonomous as fixed and in event commands a move route...  But he is still walking with out stopping.

***EDIT***  
I have redone the whole thing and still just walking...

Spoiler: ShowHide




There are 13 steps he needs to take, And ther are 20 to the door...   he is covering 7 steps that he should not cover.

Starrodkirby86

Autorun -> All the event commands play in a loop and cuts any input from the player. In other words, as long as the event is running, the player can't move, go to the menu, etc.

Parallel Process -> All the event commands play in a loop, but the player is allowed to move around.

So your question is why is he still walking, right? Well, it's because he's in a Parallel Process. That event is going to keep looping unless you stop. You can stop it by turning on a Self Switch, making a new page, then setting one of the conditions on the left side that if the Self Switch is ON, then xx happens. Look at SilverShadow's post with pictures to see how he did the self switch thing.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




DeXuS

Got ya...  And now he stops. (was a switch glitch, Didn't have one.)  :^_^': Phew, That was fun.   Cool..  But I thought the 'wait for moves completion' would stop him regardless of the switch being set, Guess not.
Anyways, Thank you all so much for all the help.

I had another npc freeze the system...  This time it happend after a show choices option.  During testing I select yes and it works perfect, select no and it freezes.  There was nothing there but a message saying 'Oh well, Suit your self...' Anyone have any clues? I have no custon scripts installed, but I did modify the main window to have a full transparant background and border, But I have not had any problem with it.

 

Starrodkirby86

Wait for Move's Completion means that the game's event interpreter won't move on to the next event command for that event until its previous movement. I think.

Now I'm going to assume that every time you're referring to the game freezing, some event is running on Autorun. Is the Show Choice event running on Autorun? When you press Yes, do you leave that event (i.e. it goes to another page or something or the event is erased)?

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




ForeverZer0

What do the different branches do, or are you saying that it does it when they are empty?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

DeXuS

no, was set to do it by action button. it stays on the same event.  Just two choices

Are you ready?
yes.  He walkst to the door and unlocks it.
no. 'ok, go get ready and come back and talk to me. (no commands/scripts/or any thing else)

No, it was not empty, it has a message and that was it.  Do you think I just need to re-install?  I have remade the event twice and it still does it.  Re-doing it worked the last time.

SilverShadow737

Does the event turn on any switches that trigger an autorun before the conditional branch?
Is the event autorun?
It sounds basically like you activated a blank autorun event.
Ginyu Force Rules

DeXuS

January 13, 2011, 03:17:00 pm #21 Last Edit: January 13, 2011, 03:20:09 pm by DeXuS
No, it was not blank, and it is a 'show choices' option.  The yes works fine.  The no (with only a message) is what crashes.
I am just thinking about loosing the 'are you ready' option... 

SilverShadow737

The only way I could possibly figure this out is with pictures.

Did you activate any switches at all before the show choices branch?
Ginyu Force Rules

DeXuS

Spent the last week doing and re-doing this same thing over...  and over... AND over...
Well the pratice helps.  finally got it going in a decent direction.  He now stops where he is susposed to...  but even switching to a new page in the event, it does not follow through with the people (Party) following him correctly... (they are on the same path using the same commands other than a 1 seccond delay in the action)  and they always seem to be in a diffrent spot half the time.) Is it NOT helping that I am testing this event by putting party start position in the event?  Could the previous page of events that initalised this event not being active be messing it up?  Any tips on THAT would be appreciated. 

And I am on a 56k connection with lousy service.  Getting any screenshots would be difficult if at all possible since netzero keeps falling off-line every time the wind blows.  Still waiting on a ride to the library so I can use thier internet to upload pictures.

Makeshift

is repeat action on thats the only thing i can think of try at after the move putting a self switch on and and making the move countinue thats the only thing i could think of

DeXuS

No.  I have not yet found a use for repeat so I have never used it.  :wacko: 
Can you point me to any tutorials for doing long npc eventing properly?  I seem to be able to manage simple short "move to an object" type events, but to make longer, complex events that act semi normal is obviously beyond my grasp.

SilverShadow737

February 07, 2011, 03:45:11 pm #26 Last Edit: February 07, 2011, 03:48:11 pm by SilverShadow737
Did you make sure to put wait for moves completion before starting a new move route or something that may interrupt the move?

You don't need to put it after events if they are all different moving in tandem, just put it at the end of the list, and the game should wait for the time it takes for the largest move route to complete.

Also try putting through on for the moving events, so if there's any clipping they won't just explode.
Ginyu Force Rules

DeXuS

February 08, 2011, 02:19:13 am #27 Last Edit: February 08, 2011, 02:21:04 am by DeXuS
Quote from: SilverShadow737 on February 07, 2011, 03:45:11 pm
Did you make sure to put wait for moves completion before starting a new move route or something that may interrupt the move?


SilverShadow, I could hug you right about now.  But i'm going to wait till you least expect it.  :ninja: