Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Puppetsj

#1
It works now, kind of. Still doesn't move until after I release the mouse button, and then only to the spot where I let go.
Maybe what I'm trying is impossible, but I doubt it after seeing all of the things people have managed to squeeze out of this engine. Most likely just a tad bit more complex than I feel it should be.
#2
See subject. I put the code on Interact as I want it to be kind of like dragging the character around.

The code:
Code: ags
{
cBall.TurnBeforeWalking = false;
while (Mouse.IsButtonDown(eMouseLeft)) {
  if (cBall.y <= 115) {
		cBall.StopMoving();
  }
  else if (cBall.y >= 125) {
		cBall.StopMoving();
  }
  else {
		cBall.Walk(160,  mouse.y, eAnywhere);
  }
}
}


Of course the game crashes:

QuoteError: run_text_script1: error -6 running function 'cBall_Interact':
Error: Script appears to be hung (150001 while loop iterations without an update) in "GlobalScript.asc", line 426

Also the mouse cursor won't move when the key is pressed, and the character doesn't move until after I let go of the
#3
If two characters are on the same Y coordinate and one is visually blocking the other, what determines who gets drawn first? Is there any way to change it?
#4
Thanks.

Although now I'm having other trouble. I wanted to have a variable that throughout the course of the game would be added to / detracted from depending on the choices you make, and having it affect characters, events and dialogs. So I set up a global variable... and now it seems I can't use it with this dialog_request function.
What are my options for solving this?

My thinking here is global variables can be used across the whole game whereas other types can't... but I have a sneaking suspicion I'm wrong about that.

Ah, figured it out. I hope.
#5
I'm trying to have a single dialog option have different responses from the character you're talking to based on the state of a variable, but I can't see how. So for example if I have a dialog option:

"Wanna go see a movie?"

I want the answer to that dialog option to depend on the variable 'isBored', so if it's set to 1 the character will respond with a yes but if it's not he'll say no.
SMF spam blocked by CleanTalk