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

#61
Hey there,

I wanted to comment on each game but people seem to have pointed out the most obvious. I really enjoyed playing them, and was surprised by the quality of the games even though the authors didn't seem to have enough time to add everything they wanted, so I'll definatly be waiting for expanded/complete versions! I still have to beat concurrence, it should be easier now that I get the controls  ::)

Code: ags
I have to reduce points for lack of manual and use of music from a Troika game


I love(d) troika games, and I don't really like the use of this either, but, nevermind, really it didn't take the fun out of it, just deserves to be mentioned. Btw did you know one of the team members at the old Troika Games was called Chris Jones?  ;D


#62
QuoteWhen you try to set mouse.Mode to a disabled mode, AGS will, by design, automatically change it to the next available, enabled, standard mode. This is on purpose.

Standard mode is what I was missing. I was confused.

QuoteIf eModeWalkto is disabled, the only way it will be re-enabled is if you call mouse.EnableMode(eModeWalkto). It doesn't re-enable itself if you successfully disable it. I say "if you successfully disable it" because if it is the only enabled mode it is impossible to disable it.

I think the mode is (re-)enabled after game_start, this is what made me think that:

Code: ags

//game_start
mouse.DisableMode(eModeWalkto);

//mouse_right_click
mouse.Mode = eModeWalkto;



This will set the cursor to walkto, like it was never disabled.
#63
Arf no, that's not what I meant, maybe I didn't explain well, can you try to open the default game (clean) and put this instead of selectnexmode inside (on_mouse_right_click):

Code: ags

    mouse.DisableMode(eModeTalkto);
    mouse.Mode = eModeTalkto;


Or any other mode, can you tell me what happens?

Also I mentionned the problem only happens when you're assigning the value directly and not with SlectNextMode. So no offense, but your last post's edit makes no sense.
#64
Quoteyou cannot set the mouse to a disabled mode, ever. So if the mouse mode is being set to eModeWalkto, then eModeWalkto is never being disabled.

If you use :

Code: ags

mouse.DisableMode(eModeTalkTo);
mouse.Mode = eModeTalkTo;


It will reset the cursor to 0 (walkto) by default, if it's not disabled as well. So you need to check if the mode is enabled before changing it with something else than SelectNextMode().

I have just tested (inside on_mouse_click) with all the mouse modes disabled, setting the mouse mode to anything will just reset to walkto, I'm using AGS 3.2.
#65
Yes you're right about the global instead of a parameter, but the Game.InventoryItemCount, it's supposed to store the total number of created items in the game, not the number the player is holding, but it still works that way.

And yes, I knew there was a better/safer way to do it, I'm sorry I haven't experimented much with the inventory but I can see what you mean with the item quantity.
#66
This could work as a SelectPreviousMode, while skipping disabled ones.

Code: ags


//global-outside functions

bool is_enabled[10];

//game_start

int i = 0;
while(i < 10)
{
  is_enabled[i] = true;
  i++;
}

//on_mouse_south_wheel - the number 3 represents the last mousemode

if(mouse.Mode == 0)
 mouse.Mode = 3;
else
 mouse.Mode--;
 
while(!is_enabled[mouse.Mode])
{
  if(mouse.Mode == 0)
    mouse.Mode = 3; //last mode number
  else
   mouse.Mode--;
}

//when you want to disable a mode

is_enabled[eModeWalkto] = false;
mouse.DisableMode(eModeWalkTo);



This will hang if all the modes are disabled at the same time and you try to switch.

Edit: I have confirmed SelectNextMode() will skip modes you have disabled via mouse.DisableMode();  

I think the problem comes from the mouse.Mode = mouse.Mode - 1; Or another part of the code, because setting the current mouse.Mode to a disabled one will make the cursor reset to 0 (walkto). This doesn't happen with SelectNextMode(), only when you set it directly like this.

If you used the code I wrote, then you could check if the mode is enabled before changing it in other parts of the code as well.

Code: ags

if(is_enabled[eModeTalkto])
 mouse.Mode = eModeTalkto;


Sorry for the long post.
#67
If the disable works with other modes, and it should, then SelectNextMode should skip the disabled modes. Here I can see that the interface behaviour is chosing 'eModeWalkTo' as the default next mode for 'eModeUseinv' when you right-click. You would just need to change that line to a mode like eModeInteract, like you did in the room load. Or have I missed something?

Also the line:

Code: ags

if (mouse.Mode>0) mouse.Mode=mouse.Mode-1;


It will probably not care about disabled modes.
#68
The palette/characters are just so fun you can't go wrong. And I've witnessed how much love has been poured into this game, attention to details and animations are just awsome!

Of course I'll do my best to help and I hope you'll be able to focus on creativity and stop worrying about coding issues ;)
#69
I've noticed something while reading some posts about walkspeed, it seems when you set the character movement_linked_to_animation, the speed will actually represent the number of pixels the character jumps while walking, so if you set the speed to 2, the character should be walking 2 pixels by 2pixels. It looked like that the last time I tried and since I wanted a smoother movement I had to turn movement_linked_to_animation to false. It might be intresting to have a look at that and see if it does what you want.
#70
If you are using an inventory window to display the items, you should be able to get the number of inv items you re carrying with .ItemCount property, let's say your window's scriptname is gInvWindow:

Code: ags


function LimitedPickUp(InventoryItem *theItem, int max_items)
{
  if( gInvWindow.ItemCount < max_items )
  {
     player.AddInventory(theItem); 
     return true;
  }
  return false;
}


Then you could have :

Code: ags


if( LimitedPickUp(iBook1, 10) == false )
 Display("Sorry you cannot carry more items in your inventory.");



Maybe there's a more simple way, or you could even check for how many "books" the player has instead of how many inventory items. But I hope it helps.

Edit about delete all items, there may be another way to do this also but it should work:

Code: ags

   int i = 0;
   while(i < gInvWindow.ItemCount)
   {
     player.LoseInventory(gInvWindow.ItemAtIndex[0]); // replace '0' with 'i' if the inventory window isn't sorted automatically.
     i++;
   }


#71
I just wanted to edit the above code to reflect the "greater than zero" and a quick test to avoid comparing strings everytime (bad habit). It's just a matter of replacing the signs/operators, but you probably figured this out.

I hope you'll release it soon, we're always looking forward to playing new AGS games, especially when the author is working hard on it :)
#72
Nope, just put the code in the global script repeatedly_execute_always, replacing, MyTextBox with the scriptname of your textbox, or MyLabel with the scriptname of the label you're using inside the global script on_key_press.

The problem being, AGS textboxes have their own on_key_press event and are only passing i.e UP/Down keys to the regular on_key_press, all the letters/numbers and printable characters will not be intercepted by the on_key_press while the texbox is active on a visible gui.
#73
I ran into this problem a while ago, and it seems there's only onActivate.
#74
You could create a global String called oldtext with no default value, then inside repeatedly_execute_always:

Code: ags


if(MyTextBox.Visible && MyTextBox.Text != oldtext)
{
  if(MyTextBox.Text.Chars[MyTextBox.Text.Length-1] <= '0' || MyTextBox.Text.Chars[MyTextBox.Text.Length-1] > '9')
  {
    MyTextBox.Text = oldtext;
  }
  oldtext = MyTextBox.Text;
}



It should filter the input, altho you will still see the char brievly.
Otherwise you should be able to use the on_key_press function with a label like this:

Code: ags


  if(MyLabel.Visible && keycode > 0 && keycode <= 9)
    MyLabel.Text.AppendChar(keycode);


#75
As I see it, the Head of the project would be the only one actually using the AGS project file, you would just have to send the resources to that person (audio clips, art, scripts).

Sometimes, not always, the programmer is the one who receives all the media content other members have produced, he's then importing and setting up everything in the game because this task requires access to the whole project file, he can then produce a compiled version for others to see the result.

But it would still be nice to have this kind of feature.
#76
Thanks a million for this great opportunity CJ!

I think a good start would be to 'update' the code, forgive me this word but as Pumaman mentioned himself, some of the code may be old and not compatible with the future changes we're planning to implement.

If we could give the code a refresh, including the suggestions about OO complete rework, without breaking the engine, then we would have a solid basis to work on for any new features.

I'm still trying to compile the source properly, when I do, I'll be glad to share my opinions and ideas.
#77
void SetBackGroundFrame(int frame);
Locks the current room to the specified background.

I must have misunderstood, sorry.

Edit: thanks Khris, thought so but couldn't test right now.
#78
If you're using 2 different background frames, with and w/o lights, you'll need to add a quick check to know which one to apply:

Code: ags


bool LightOn = false;

function hKnapp_Interact()
{
  if(LightOn)
    SetBackgroundFrame(1);
  else
    SetBackgroundFrame(2);

  LightOn = !LightOn;
}


For example.
#79
Quote
I beat square to making a 3D RPG.

Quote
I am not stealing music if it's out there for free.

Quote
DIDN'T I JUST SAY NO NEGATIVE COMMENTS?

Quote
This why I am called a troll.

Makes sense in that order.

The game looks like an early demo, I'm a big fan of FF too and I wish I could play more FF fan games but... oh well.
#80
You'll most probably need to install allegro to VC 2008, I'll update the post to let you know if I can compile.
SMF spam blocked by CleanTalk