TEMPLATE: 9-verb MI-style 1.6.4 - Last update: 4th April 2019

Started by abstauber, Thu 17/09/2009 16:16:37

Previous topic - Next topic

Giowe

ok, with 3.2 he never stop, but the first problem remain, if u click many times the character stops for a wile.. how can avoid that?

abstauber

Ah I think I know what you mean. You click like crazy at one point, but instead of moving, the player is just animating until you stop clicking.

Well... that's the default walking behavoir of AGS and also happens in the default template.

You could catch the mouse coordinates, check if the character is already moving in that direction and override the processclick command. But I'm not too sure about the side effects. Maybe you should ask this at the tech boards :)

Giowe

i'l try.
in the default template that didn't happen

abstauber

Seriously? Then I still didn't get your problem. The issue I thought was your problem happens in the default template too.

So could you please elaborate on your problem again? For dummies please :)

Giowe

wops, my error. the problem is exacty that you described and i have it with the standard ags game too. but if u run the example game of smooth scrolling + parallax modul it runs perfectly, so i think that in that modul there is something that solve my problem

abstauber

Alright, I'm glad that this is solved then :)

Since this is just a GUI template and not the whole SCUMM deal, I'll resist from integrating the walk/movement code ;)

Giowe

if you need the camera scumm like movement, add this modul that make the camera scrolling equal to scumm games

code:
//Backgorund sliding:
//-----------------------------------------------------------------------------
//Pseudo const
//
//S_VELOCITY is the camera speed. 0 no movement
//
int S_VELOCITY = 3;
int S_DISTANCE = 160;
//-----------------------------------------------------------------------------
//Global var
int xCameraCenter;
int halfScreenSize;
//State var
int movementVersor = 1; // 1 for right movement -1 for left movement
bool enableMovementRight = false;
bool enableMovementLeft = false;
//-----------------------------------------------------------------------------
//Set the new center:
//Put the character in the center of the screen
function on_event (EventType event, int data)
{
 if (event == eEventEnterRoomBeforeFadein){
   halfScreenSize = System.ScreenWidth/2;
   xCameraCenter = GetViewportX() + 160 -player.x;
   if(xCameraCenter < 0) xCameraCenter = 0;
 }
}
//-----------------------------------------------------------------------------
//Camera motion
function repeatedly_execute_always()
{
 SetViewport(xCameraCenter, 0 );
 //Check the event and set the direction
 if (  player.x > S_DISTANCE + halfScreenSize + GetViewportX() ){
   enableMovementRight = true;
   movementVersor = 1;
 }
 if (player.x < (GetViewportX() + S_DISTANCE) ){
   enableMovementLeft = true;
   movementVersor = -1;
 }
 //If the camera is on the left border or right border disable the movement
 if( Room.Width <= GetViewportX() + halfScreenSize*2 ) enableMovementRight = false;
 if(GetViewportX() == 0) enableMovementLeft = false;
 //Check if the camera and the player are in the same position
 if(xCameraCenter >= player.x - halfScreenSize) enableMovementRight = false;
 if( xCameraCenter <= player.x - halfScreenSize) enableMovementLeft = false;
 //if the movement is enabled
 if( enableMovementRight == true || enableMovementLeft == true ) xCameraCenter += movementVersor*S_VELOCITY;
}

abstauber

#127
Just wanted to let you know, that 1.3 is finally out.

Thanks to all translators :)


edit: I hope AGS 3.2 is soon officially announced, so I can ditch the 3.1 support :)

RoliX


BlueAngel

Hi
I have a problem with scrolling my inventory window.
If the player got more things than the window can hold, the down arrow light up and you can press it.
But the item under (row 2) just flash/shows for a second then it (the window) shows the first row again.
I havent change anything (I think) but the graphics and the size of the window.
Any idea?
???

abstauber

Hmm, could you post the version of the template you're using?

In the older versions you had to adjust some variables to your inventory item size. So you can also check the beginning of guiscript.asc and see if the inv variables match your new item size.

BlueAngel

#131
I'm using version Version: 1.2.1 and AGS 3.2.0.102

I also should mention that the game I’m making is in 800X600. I read in an old thread that resizing could mess things up.

I have been looking in the guiscript.asc as that was mention in that old thread but not finding the right things. I keep on looking. Do you think I should download a new version of the module? I afraid of messing my game up as it is almost finished.

EDIT: So sorry for wasting your time. I forgot I split up the main gui and the inventory gui. Script now working.

abstauber

Great to hear that you've solved that puzzle :)

About my question regarding the version: I just wanted to make sure that I look into the right code base, a  whole template upgrade should never nessecary. Most things are patchable :)

SN1984jm

I thought I had seen a specific topic for asking questions about the use of this template, but I can't seem to find it anymore.
I'm just gonna have to ask it here I'm afraid (even though I can hardly believe it has not been asked before, but again, couldn't find the answer).

If you change the resolution to say, 800x600 in the very beginning of setting up your game, how can you best fix the GUI (It's all over the place now). Is this done in the overall script of the template, or do I need to change many GUI options inside AGS?

abstauber

Quote from: SN1984jm on Fri 13/05/2011 18:59:01
If you change the resolution to say, 800x600 in the very beginning of setting up your game, how can you best fix the GUI (It's all over the place now). Is this done in the overall script of the template, or do I need to change many GUI options inside AGS?

You just need to adjust the GUIs inside the editor, no need to alter the code for that.

Jackpumpkinhead

#135
I thought I would post in here instead since my problem is with the 9verb MI template. As I mentioned in the previous thread I am getting an error when I try to adjust the volume in the options menu. The error says that -1 is not between 0...100.

I am using version 1.2.1



Also I wanted to know, if I get version 1.3 and start using it, is there a lot I wil have to change to the game to make it run right? Will I have to make any changes in scripting or code?
currently on an indefinite hold.

Jackpumpkinhead

updated with picture
sorry if this is considered a double post
currently on an indefinite hold.

Khris

If you select the slider in AGSEdit, what does it say for MaxValue and MinValue?

Jackpumpkinhead

Not sure, would this have something to do with it? Would I just change the min value to -1 if it were 0? Also when you use the slider in the game to turn the music down it just mutes the music. Though this may be due to the error.
currently on an indefinite hold.

Khris

I've just been looking at AGS 3.1, the parameter for SetMusicVolume was supposed to be in the range of -3 to 3. So I'm guessing that your template was made for that version of AGS or an even older one and the music volume's min and max values are probably -3 and 3.

While the code tries to call the correct command depending on the AGS version, it doesn't set the slider values.

This is pretty much a bug in the template.
You can fix this by setting the MinValue to 0 and the MaxValue to 100 for both the Sound and Music volume slider.

To fix the template, this must be added to game_start():

Code: ags
#ifver 3.2
  OptionsSldMusic.Min = 0;
  OptionsSldMusic.Max = 100;
  OptionsSldSound.Min = 0;
  OptionsSldSound.Max = 100;
#endif
#ifnver 3.2
  OptionsSldMusic.Min = -3;
  OptionsSldMusic.Max = 3;  
  OptionsSldSound.Min = 0;  
  OptionsSldSound.Max = 255;
#endif


And at the start of OptionsDefault_OnClick:

Code: ags
#ifver 3.2
  OptionsSldMusic.Value = 80;
  OptionsSldSound.Value = 90;
#endif
#ifnver 3.2
  OptionsSldMusic.Value = 2;
  OptionsSldSound.Value = 230;
#endif

SMF spam blocked by CleanTalk