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 - Hobo Joe

#21
I couldn't figure out where the global variables above the script you were talking about were, so I've set it up like so:

  int happy;
  int sad;
  int angry;
  SetGlobalInt (happy, Random(10));
  SetGlobalInt (sad, Random(10));
  SetGlobalInt (angry, Random(10));
  if (GetGlobalInt (happy) <=5 && GetGlobalInt(sad)<=5){
  SetGlobalInt (angry, Random(5)+5);
  }
  if (GetGlobalInt (sad) <=5 && GetGlobalInt(angry)<=5){
  SetGlobalInt (happy, Random(5)+5);
  }
  if (GetGlobalInt (angry) <=5 && GetGlobalInt(happy)<=5){
  SetGlobalInt (sad, Random(5)+5);
  }
  if (GetGlobalInt (angry) ==0){
  SetGlobalInt (angry, (1));
  }
  if (GetGlobalInt (happy) ==0){
  SetGlobalInt (happy, (1));
  }
  if (GetGlobalInt (sad) ==0){
  SetGlobalInt (sad, (1));
  }

I added a thing to try to prevent them from being zero at the end because I don't know of a more efficient way to do it just yet. Once I set up a whole crapload of these, we'll see if any of this affects any gameplay! Thanks for the help, guys.
#22
Okay. That works, thanks. However, one more problem, then I'll be out of your hair.

When I run it now, it starts to boot, crashes, then says interaction variable "happy" not found. How do I create variables in script? Never could figure that out.
#23
Okay... now it says

GlobalScript.asc(61): Error (line 61): read/write ax called with non-variable parameter ('=')


The script looks like this now

  SetGraphicalVariable("happy", Random(10));
  SetGraphicalVariable("sad", Random(10));
  SetGraphicalVariable("angry", Random(10));
  if (GetGraphicalVariable("happy")<=5)
  if (GetGraphicalVariable("sad")<=5){
  SetGraphicalVariable("angry", =>(5));
}

Also, is that the proper way to set it up so that if BOTH happy and sad <=5 then it changes, or will only one of them affect it?
#24
Basically, what I'm trying to do is set it up so that if 2 particular graphical variables are less than or equal to 5, a third variable will be set to greater than or equal to 5. Having troubles. Here's my script:

SetGraphicalVariable("happy", Random(10));
SetGraphicalVariable("sad", Random(10));
SetGraphicalVariable("angry", Random(10));
if (GetGraphicalVariable("happy")<=6)
if (GetGraphicalVariable("sad")<=6){
SetGraphicalVariable("angry", (>=(5)));
}

I'm getting this error:

GlobalScript.asc(61): Error (line 61): Parse error: unexpected operator '>='

Obviously it doesn't like the >=, but I don't know what better way to put it in context or what else to try if it doesn't work. Help would be much appreciated.


EDIT: GAH! Wrong forum. ::)
#25
Okay, I've figured out how to make it randomly move to different rooms, but I can't figure out what to set up to make it wander around the room. Rather, I can, but either it walks somewhere once and stops, or it walks/turns in place forever. How can I tell it to walk, stop, walk again, etc.?
#26
That isn't even remotely helpful. Of course I'm aware that I need the sprites. I suppose I could have been more specific. I need to know what sort of SCRIPTING I need to do to achieve this. I'm fully aware of the need for sprites in a mostly sprite based engine, ...thanks.
#27
For a few weeks now, every AGS game I work on or play, winds up looking blurry, like it's got some kind of filter on it. I'm running them full screen in 320x200 mode, which is correct for each one I'm playing, so what's the deal? Help would be lovely. Thanks!

EDIT: It looks fine in windowed mode, which would be great if I were playing it on a DS or something. Help!
#28
I'm trying to figure out how to have a cat in my game that randomly switches rooms and moves around, occasionally stopping to clean itself and whatnot. I'm not entirely (or at all) sure on how to go about doing this. Any help would be much appreciated. Thanks!
SMF spam blocked by CleanTalk