Make a custom NPC animation/walking route start again AFTER dialog

Started by Olleh19, Sat 29/02/2020 01:25:14

Previous topic - Next topic

Olleh19

Edit: So a long subject, got a lot shorter simply cause i've solved most of my own problems, maybe i was on drugs after all!  (roll) (laugh)
Edit number 3000: I think this must be clear now. Going to rehab now, cya guys (it's a joke) :P

I can't believe i've got the animation/walk to actually work considering i am a complete novice, extreme megan00b programmingwannabe  (laugh)
However i've googled and searched the forum for information,

and i can't seem to grasp how to make the NPC go back to his route after the dialog with the player, or being stopped with cNPC.Stopmoving();

Perhaps using Ints? The information i've found on the forum does not seem to work, or i'm misunderstanding it.
Should the code be written inside the dialogs themselfs after a "stop" forexample, when obviously the dialog exits, should the code be placed there at the ends?

Example:

Code: ags
@2// Dialog script file
@S  // Dialog startup entry point

cEgo: Hi, who are you?
Olleh: I'm a n00b AGS man. Trying to do my animations here.
cEgo: Okay, we at the AGS forum love to help such idiots as you! :D
player.AddInventory(iCupforn00bquestionsofthecentury);
Stop
cNPC.Animation(); //?! doesn't work, a custom function i've made

TheManInBoots

Olleh, serious question, were you on drugs while you wrote this?
(laugh) ok, I'm just kidding!
But honestly, this is a very confusing thread.
I might not be the perfect communicator myself, but if you're genuinely looking for help for the issues you're having, I think a good start would be to re-write the entire thread. Because it almost sounds like a prank with all the confusing elements, even though this might not have been your intention at all.

Examples of confusing parts:

Quote from: Olleh19 on Sat 29/02/2020 01:25:14
And another thing. The NPC does some quite ANNOYING SOUNDS  (laugh) and the room is rather large,
so it would be nice if one could just perhaps mute the sound, aswell as his random talking/texts in the bakground.
Noone knows what you mean with annoying sounds.
Why does it matter that the room is large?
It is all totally unclear from what you say.

Quote from: Olleh19 on Sat 29/02/2020 01:25:14
What happens now is that the talking is shown on the screen even tho i left the NPC "in a galaxy far faaar away".
So it would make sense for A. He stops his animations/moves temporarely (i've tried that, unsuccessfully, as code here will show) :-D
So again, when you say "in a galaxy faar away", nobody understands what you mean. Is it just a metaphor, or part of the game plot?

Also, who is A.?
What do you mean, he moves temporarily? And what is he supposed to do instead? What did you try unsuccesfully?



So, my advice would be to re-write the entire thread, start by describing only one problem at a time, and when it's solved, you can start tackling the next problem.
The way you described everything at once it becomes completely unintelligible.

And when you address the problem, start by describing clearly what you want to create, then what you have created so far and where the current problem lays that you're unable to fix. So people know how to help you.


But I guess thanks, this is a good example on how not to write a thread for the technical forum.
And it's no problem, we're all here to learn and improve. ;)
But if you want people to be actually able to help you, you will probably have to re-write your thread!

Olleh19

The irony is, i was almost (on drugs) (laugh). Damn tired, but i tried to write it "understandable". But hey, you know what? I've solved a lot of the issues!
Still think i'm doing stuff wrong, but if it works it works "i guess".

This is the problem i guess with explaining stuff on a forum and "in person". It's virtually impossible when it's so "complex" stuff going on.

I'll edit the post see if i can do it better, but don't expect any miracles! (laugh)

It's supposed to be a "joke or sarcasm", the player simply is waaaaaaaay far away from the actual NPC, which makes his sound fx,  just annoying and useless, but again. I've actually solved it. It's a miracle!! :)

So what's left is the dialog, how to make the NPC start doing his things again after the dialog. I've red about Idleview (on the forum) but i didn't get that one too work. Even tho i created it in another view.

Cassiebsg

When you write commands inside the dialog script, you need to INDENT then with at least a space.

So try this instead:
Code: ags

@2// Dialog script file
@S  // Dialog startup entry point
 
cEgo: Hi, who are you?
Olleh: I'm a n00b AGS man. Trying to do my animations here.
cEgo: Okay, we at the AGS forum love to help such idiots as you! :D
  player.AddInventory(iCupforn00bquestionsofthecentury); // Indent this as well
  cNPC.Animation(); // Now that this is INDENT it should work. AND this should come before the stop, or it won't ever be called!
Stop
There are those who believe that life here began out there...

Olleh19

Quote from: Cassiebsg on Sat 29/02/2020 13:34:08
When you write commands inside the dialog script, you need to INDENT then with at least a space.

So try this instead:
Code: ags

@2// Dialog script file
@S  // Dialog startup entry point
 
cEgo: Hi, who are you?
Olleh: I'm a n00b AGS man. Trying to do my animations here.
cEgo: Okay, we at the AGS forum love to help such idiots as you! :D
  player.AddInventory(iCupforn00bquestionsofthecentury); // Indent this as well
  cNPC.Animation(); // Now that this is INDENT it should work. AND this should come before the stop, or it won't ever be called!
Stop



Ahhh!! Thanks a lot! ;)

SMF spam blocked by CleanTalk