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 - Phemar

#121
Can you describe the behavior you're referring to? For those who can't remember the game off the top of our heads.
#122
Does anyone have a copy of Balloon Face, made for the OROW 2 competition?

All the links I've found have been dead and it would be nice to play that little gem again.
#123
Does no one remember this version?
http://www.youtube.com/watch?v=qyvJadGcsPU
#124
Quote from: CaptainD on Wed 08/05/2013 14:58:30
Quote from: Radiant on Wed 08/05/2013 14:44:20
Well, you could get beta access for the inevitable sequel... 8-)

Don't you mean squeaker access?


No, what he meant was the "inevitable squeakel".

As a huge fan of platformers (nothing I love more than putting on a good record and jamming on the NES), I really enjoyed this game.

I think the mechanics worked really well; I would have found it fiddly had the inertia and skidding not been present, and especially if every jump was equi-distant. This kind of how it worked in Super Mario, Adventure Island etc, which is what made them such great games.

Btw, as Peder said earlier than the thread, is there any chance of you releasing an open source version of this? It would be a great learning tool.
#125
Try using something like:

Code: ags
if (!player.HasInventory(player.ActiveInventory))
  player.ActiveInventory = null;


Also, are you sure not trying to access player.InventoryQuantity[] with an an index below zero?
#126
Q. What is this?

A. It's a module for a custom dialog GUI modeled after LucasArt's games. But more importantly, it does a bunch of cool things. It's non-blocking (which means you can interact with hotspots during a dialog), and it addresses a bunch of things from the bug and suggestion tracker.

Q. What does NBD stand for?

A. It's an acronym, and acronyms are COOL.

Q. How's this different to the other dialog module out there?

A. This one doesn't use any of AGS's built-in features for rendering dialog windows. That means it doesn't block the script while it's running.

Q. That doesn't sound so special, what else does it do?

A. Oh shush you. Here, take a look at this:

Q: Can I run an individual dialog option using this module?

A: Why yes you can! Just use the RunOption (int option) command.

Q. Does this module have the ability to keep the dialog GUI visible while the conversation plays out?

A. Of course it does! This module is designed to be like LucasArt's dialog system, which it means it works well for games that have a GUI that takes up permanent screen space.

Q. Can I set the color the options are highlighted in?

A. You can do that too! Just #define NBD_SELECT_COLOR in the module header.

Q. Do I have the option of turning off the startup option?

A. That option is available too! Just run your dialog with the argument eNBD_DontPlayStartup.

Q. Are the options scrollable? Can I have like, arrow buttons on my GUI?

A. You sure can! This dialog GUI is designed to be a fixed width and height, which means that it NEEDS to be scrollable.

Q. Does this module provide me with the power of AGS's normal script editor, which isn't available in the dialog script editor?

A. Since all your dialog scripts will be written in a separate module, you can have ALL THE POWER of the normal script editor!

Q. Can I set font the options are displayed in, and can I change it at a later stage if I wanted to?

A. Oh you, of course you can do that. Since the options are displayed as labels on a GUI, you can just set the label's font to whichever you choose!

Q. Alright, I guess that does sound pretty cool. Where can I get it?

A. RIGHT HERE!

If anyone wants to do some more testing on please feel free! I think I've alpha tested as much as I can and while I can quite positively say there shouldn't be any kinks, some always manage to creep out of nowhere.
#127
Yea I dunno it might be an AGS thing. I had the same problem when scripting a click animation for the mouse a few days ago. Just gave up on the feature too :/
#128
I just tested your code out and it seems to work fine. I had no problems.

There's just a tiny glitch when you quick load, the "Quicksave" speech is still visible.
#129
Hmmm. I've designed my game in such a way that not a single blocking command is called throughout the entire script. As you might be able to tell from the example I posted above, I've basically written my own scripting engine in AGS. It can run any command non-blocking, such as character.Say and Wait etc.
The downside to this is that it's a little bit slower (only one command per game loop), but the effect on gameplay is worth it.

The only command I had in repeatedly_execute was Overlay.SetText, which shouldn't stop SkipUntilCharacterStops, should it? It's not blocking, it's not a message box and nor does toggle a GUI.

Oh well.
#130
Sorry Crimson, I'm using the latest release - build 3.2.1.111. I call SkipUntilCharacterStops from inside a module's on_key_press.

Eg.
Code: ags

function on_key_press (eKeyCode keycode) {
  
  if (Queue.Playing()) {     // If an interaction is playing
    
    if (keycode == eKeySpace) {
      
      if (oSpeech.Valid) {    // If speech is currently displayed
        
        if (t == p)   // If it's the last command in the series of commands for the interaction
          Queue.Stop (eQueue_Reset);  // Stop the interaction
          
        else {
          Queue.Stop (eQueue_DontReset);  // Skip the current line of speech
          Queue.Resume ();
      } }
      
      ClaimEvent ();
    
    }
    
    if (keycode == eKeyEscape) {
      if (player.Moving)
        SkipUntilCharacterStops (player.ID);  // If the move command is part of a scripted command
      else {
        Queue.Stop();  // Stop the current interaction
        ClaimEvent ();
    } }
  
  }
  
  else if (keycode == eKeyEscape)
    SkipUntilCharacterStops  (player.ID);  // If the move command is a mouse command
}
#131
I don't know if this is a bug or if I did something wrong (I don't think so?), but it seems that whenever I place any code in my room's repeatedly_execute function (it can be any code, from one line to a 100 lines) then SkipUntilCharacterStops is disabled.

I originally discovered this while keeping the text on an overlay updated (for debugging purposes). The problem seemed to resolve itself after I removed the offending lines (all of them!) from repeatedly_execute.
#132
One of my first games (Counterfeit) used the text parser.

Though I wouldn't play it if I were you, it's quite bad and the parser is pretty dumb haha. Oh well, I had just turned 14 when it was released. Good times!
#133
Ryan's right of course. Sorry I'm just half asleep.
#134
That's correct, integers don't store decimal places which means it'll always be rounded down to 0.

If you want to work with decimal places you'll need to use floats throughout your calculations.

Eg
Code: ags
int x = (7 / 15) * 40;


Will always give 0, since 7/15 < 1, and 0 * 40 = 40.

Edit, try this:
Code: ags
int LUCK = 1; //may have a value of 1 to 100

bool LuckSuccess;

float VARIABLE = 0.0025;

function TryYourLuck (int difficulty) {

  if ((((IntToFloat(LUCK) * IntToFloat(LUCK) * VARIABLE) + 5.0)
      * (100.0/IntToFloat(difficulty))) >= IntToFloat(Random(100)))
    LuckSuccess = true;
    
}


Edit again. For simplicity's sake you could just have the function return a boolean value. Eg:
Code: ags
int LUCK = 1; //may have a value of 1 to 100

float VARIABLE = 0.0025;

bool TryYourLuck (int difficulty) {

  if ((((IntToFloat(LUCK * LUCK) * VARIABLE) + 5.0)
      * (100.0/IntToFloat(difficulty))) >= IntToFloat(Random(100)))
    return true;
    
}


Then just call the function like:
Code: ags
if (TryYourLuck(10)) { // If the player won
  //code here
}
else { // If the player lost
  //code here
}
#135
I like all these ideas and am in full support. Even if it's not true OO programming, consistency in commands is key to hassle-free scripting and this would make life a lot easier than continually consulting the manual and trying to remember which commands are called on an object and which commands aren't.
#136
Damn. Well there are ways around my problem - workarounds if you will. It's just gonna lead to a lot of repeated code and will be somewhat inefficient. Oh well, thanks for the quick reply!
#137
So I've written quite a few modules for my current project. Right now my problem lies with three of them - I have a custom dialog system module and a non-blocking script command module.

They're ordered like this:

- Dialog Module (essence of the code)
- Non-blocking module
- Dialog scripts module (the scripts for each dialog)

The non-blocking module needs to call the dialog.Run command from the dialog module and the dialog script module needs to call the non-blocking functions from the non-blocking module.

This worked fine until today I realized I also need to call the RunDialogOption command in the dialog scripts module from the dialog module.

Is there anyway to call a function from a module that's below?
#138
I thought about both ways of doing it, and I think sprites would probably look better and offer more options for customization.
#139
Can't be too hard to write. Since I've got some free time maybe this'll be my next project.
#140
WrongTarget, that's exactly what it's like.

Although this version is out of date now, I've updated the entire thing and it is now no longer just a module for background speech, but rather an entire non-blocking script engine.

What this means is it is able to run ANY function in AGS completely non-blocking!

EDIT: I will release it in it's current form sometime, it's just heavily integrated into my current project at the moment so once I perfect this system I'll separate it and release it.
SMF spam blocked by CleanTalk