Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RESOLVED] Problem with a quest (how to not make an NPC...)

Caine

Member

I've started making my first game in XP now, and I'm having problem with a script.

As soon as the game starts, the main character's father is supposed to walk up to her and give her a task, That works just fine, but I want him to remain on the screen, but he disappears when the script ends. This is the very simple script and settings:

scriptproblem1.png


As you can see I simply launch an animation, should I perhaps instead make her dad an actual actor? If so, how would I make him behave the way I want him to? I'm sorry if this is a noobish question, but right now I'm kinda overwhelmed by the script editor. I can do the simple "if - then - else" things, but this I haven't figured out just yet.
 
This is in the wrong section (Should be General Support, rather than Script Support) but I think I know the problem, have you set the actor on page 2? As it is currently that would seem the most likely cause of such a problem. Try this and if it doesn't solve your problem get back to me, I'll see what else it could be.
 

Caine

Member

Desecration":3dtvq7yg said:
This is in the wrong section (Should be General Support, rather than Script Support) but I think I know the problem, have you set the actor on page 2? As it is currently that would seem the most likely cause of such a problem. Try this and if it doesn't solve your problem get back to me, I'll see what else it could be.
Thank you, that solved the problem. :)
 

Caine

Member

However...now I have another problem. This is the way the script should go:

1. Dad gives girl a bowl of stew to deliver to her godfather - sets a switch to on and adds an item
2. Girl gives stew to godfather - sets switch to off and removes the item and gives her a new item
3. Girl returns to dad, he thanks her.

The problem is that he never stops thanking her. I don't want that part of the script to repeat. I guess I could use ANOTHER switch and a conditional script to run it only once, but maybe there's a better way?

Screenshots:
scriptproblem2yy6.png


scriptproblem3ug4.png
 
Well you've pretty much solved your problem by yourself, as you said switches and conditional branches are usually a pretty easy way to get events to do what you want. If you have any more questions feel free to post and ask, I'm glad to of been some help.
 

Caine

Member

Desecration":earxql5b said:
Well you've pretty much solved your problem by yourself, as you said switches and conditional branches are usually a pretty easy way to get events to do what you want. If you have any more questions feel free to post and ask, I'm glad to of been some help.
Well thank you very much. :) I just thought maybe there was some easy option to just click in a box or something, and it would stop running. ^_^
 

Caine

Member

This is so annoying. xD Now I can't make him stop running after me. :P I want him to approach the player when the quest begins, but I don't want him to keep following me when the quest is finished. How do I do that?

scriptproblem4.png
 
Just use a switch, its probably better if you're just learning. Make a 3rd event page and have him just standing there saying a message of your choice, you should trigger this 3rd page when the Quest is completed from the second page, rather than going back to the first which is triggering the Custom movement route. Hope this helps.
 

Caine

Member

Desecration":1pagovb0 said:
Just use a switch, its probably better if you're just learning. Make a 3rd event page and have him just standing there saying a message of your choice, you should trigger this 3rd page when the Quest is completed from the second page, rather than going back to the first which is triggering the Custom movement route. Hope this helps.
Of course! I'm so stupid, I wanted to make a new page, but I forgot where the button was! xD
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top