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

#3421
I don't think that's quite what I meant Ryan but thanks anyhow.

I think I will be able to sort it out, given time and strength  (laugh)
#3422
Hi

I have a GUI that acts as a radar where a button represents the character and moves in relation to the character.

Maths for the button:
Code: AGS

Button30.X = cFrankj.x/7;
Button30.Y = cFrankj.y/5;


For normal (640 x 480) rooms this is fine.

You can probably guess my next one. I need to add something like GetAtScreenXY rather than Room x y as the room the character is in is 2000 x 480. I need to have the button mimic the characters position in a room that size and for the button to stay within the confines of the radar (which of course is round). I think the y is ok and it's mainly x position.

Would you please lend me a hand.

Thank you


#3423
Ints only show full numbers: 1,2,3 etc

IntToFloat not FloatToInt i believe
#3424
I have the feeling it could involve these  (roll):

Code: AGS
GUI* theGui = GUI.GetAtScreenXY(mouse.x, mouse.y);
 if (theGui == gStatusline && mouse.Mode != eModePointer) 
{
 old_mode=mouse.Mode;
 mouse.ChangeModeGraphic (eModePointer, 2061);
 mouse.Mode = eModePointer;

//WORKS OVER ICONBAR
 GUIControl *gcat = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
 if ((gcat == null) || (gcat.AsButton == null)) mouse.UseDefaultGraphic();
 else mouse.UseModeGraphic(eModePointer);
 
}
 
 if (theGui != gStatusline && mouse.Mode == eModePointer && mouse.GetModeGraphic(eModePointer) == 2061) 
{
  mouse.Mode=old_mode;
}



EDIT:

Taking this out makes it work ok but then cursor does not turn into pointer over giconbar!

Code: AGS
 //WORKS OVER ICONBAR
 GUIControl *gcat = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
 if ((gcat == null) || (gcat.AsButton == null)) mouse.UseDefaultGraphic();
 else mouse.UseModeGraphic(eModePointer);


EDIT: I have gone another way about doing this so this post is no longer valid.




#3425
Well Khris,

Default game will run ok, as it should, so it must be a script entry in Global that stops it from implementing as it should.

I'm not sure which part of the script is stopping it.

The Wait cursor is sprite 316, View=18.

Here is the entire Rep Exe Always in Global (unless problem is eleswhere?):
(I'll get the rather large mallet out ready ;))

Code: AGS

function repeatedly_execute_always() {
  
  // Put anything you want to happen every game cycle, even
  // when the game is blocked inside a command like a
  // blocking Walk().
  // You cannot run blocking commands from this function.
    
  // Button32.Animate(15, 0, 2, eRepeat);
    
  gfakeicon.Clickable=false; 
  LScore.Text = String.Format("Rip pieces: %d of 7", note_piece);
  Lfilmleft.Text = String.Format("%d seconds", FilmTime);

 GUI* theGui = GUI.GetAtScreenXY(mouse.x, mouse.y);
 if (theGui == gStatusline && mouse.Mode != eModePointer) 
{
 old_mode=mouse.Mode;
 mouse.ChangeModeGraphic (eModePointer, 2061);
 mouse.Mode = eModePointer;
}
 
 //WORKS OVER ICONBAR
 GUIControl *gcat = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
 if ((gcat == null) || (gcat.AsButton == null)) mouse.UseDefaultGraphic();
 else mouse.UseModeGraphic(eModePointer);
{
 if (theGui != gStatusline && mouse.Mode == eModePointer && mouse.GetModeGraphic(eModePointer) == 2061) 
{
  mouse.Mode=old_mode;
  
}
  if (gSaveGame.Visible || gRestartYN.Visible ||gRestoreGame.Visible || gPanel.Visible)
{
   mouse.Mode = eModeInteract;
   mouse.Mode = eModePointer;

} 
 
  //SEEMS TO WORK
 if (gInventory.Visible==true && mouse.ChangeModeGraphic(eModeUseinv,2057 ))
{
     mouse.Mode = eModeUseinv;
}
 
 // TO DISABLE CP SAVE RESTORE
 
 if (gfilms.Visible==true || gletter.Visible==true ||  gmemory.Visible==true)
{
   gIconbar.Visible=false;  
   gStatusline.Visible=false; 
   gSaveGame.Visible=false;
   gRestoreGame.Visible=false;
   gPanel.Visible=false;
   mouse.Mode = eModeInteract;
   mouse.Mode = eModePointer;

}
 
  if (cFrankj.Room==2 && gPasswordGUI.Visible==true)
{
    
   mouse.DisableMode(eModeLookat);
   mouse.DisableMode(eModeTalkto);
   mouse.DisableMode(eModeWalkto);
   gStatusline.Visible=false;
   gIconbar.Visible=false;
   mouse.Mode = eModeInteract;
   mouse.UseModeGraphic(eModePointer);
  
}
  
   // BOOK PIECES BUTTON GRAPHICS

  if(note_piece==1)
{
   Button1.Visible=true;
   Button1.NormalGraphic=171;
   note1=false;
  
}
 else if (note_piece ==2)
{
    
   Button2.Visible=true;
   Button2.NormalGraphic=172;
   note2=false;
  
 
}
 else if (note_piece ==3)
{
    
   Button3.Visible=true;
   Button3.NormalGraphic=173;
   note3=false;
}
 else if (note_piece ==4)
{
   Button4.Visible=true;
   Button4.NormalGraphic=174;
   note4=false;
 
  
}
 else if (note_piece ==5)
{
    
   Button5.Visible=true;
   Button5.NormalGraphic=175;
   note5=false;
}
 else if (note_piece ==6)
{
   Button6.Visible=true;
   Button6.NormalGraphic=176;
   note6=false;
  
}
 else if (note_piece ==7)
{
  Button7.Visible=true;
  Button7.NormalGraphic=177;
  note7=false;
  
}
 else if (note_piece ==8)
{
  Button8.Visible=true;
  Button8.NormalGraphic=178;
  note8=false;
}
    
  // CHANGE MOUSE MODE FOR GLETTER AND GFILMS

  if (gletter.Visible==true || gfilms.Visible==true)
{
   gIconbar.Visible=false;  
   gStatusline.Visible=false; 
   mouse.ChangeModeGraphic(eModeInteract, 2057);
}
  
  // FILMS TAKEN NOT TAKEN
  
  if (Button12.Visible)
{
       Lfilms.Text=("Films you have taken");

}
  else
{
   Lfilms.Text=("You have not taken any film");
}
  Button30.X = cFrankj.x/7;
  Button30.Y = cFrankj.y/5;
}

}


cheers



#3426
Hi

this issue has been raised before (by strazer) quite some time ago I am unable to resolve at the moment. Hopefully some light can be shed to fathom out why and provide a solution.

With character 'Say' the cursor changes to Wait Mode yet when player is Walking in eBlock the cursor does not change to Wait mode but rather Interact after Interacting with an object.

I believe this code was mentioned in the post:

Code: AGS

if ( ! IsInterfaceEnabled() )
{
 mouse.Mode = eModeWait;
}


Problem is, though it works, it becomes a cursor Wait mode afterwards along with the other normal Mouse cursor modes.

Without having to put lots of script here maybe you can systematically see where the problem may lie?

Cheers for all help / assistance


#3427
General Discussion / Re: AGS Kart
Thu 02/05/2013 19:01:19
I tried to run it with DD5 and it froze after preloading screen came up and I had to restart computer (plug out). On restarting it froze on a black screen and would not boot up. Had to reboot from disk.... Windows running now..
#3428
Hi

I have a situation that to some may be acceptable but I don't and hope someone will assist me in this niggling problem.

I have scripted so that when the mouse is over the gStatusline (bottom of screen) the mouse changes to a pointer and when leaving the gStatusline it returns mouse.Mode=old_mode. This work fine, no problem.

Code: AGS
GUI* theGui = GUI.GetAtScreenXY(mouse.x, mouse.y);
 if (theGui == gStatusline && mouse.Mode != eModePointer) 
{
 old_mode=mouse.Mode;
 mouse.ChangeModeGraphic (eModePointer, 2061);
 mouse.Mode = eModePointer;
}


I also have the gIconbar Visible at all times at the top right of screen.

I have had to script the gIconbar so that the mouse acts like as gStatusline regarding cursor modes ie mouse changes to pointer when over gIconbar buttons.

Now, the problem is this: The mouse, when hovering over the close inventory button changes to a pointer. Once inventory is closed the mouse reverts to the inventory item if one was selected.

I know the reason is because I have this scripted for buttons:

Code: AGS
 GUIControl *gcat = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
 if ((gcat == null) || (gcat.AsButton == null)) mouse.UseDefaultGraphic();
 else mouse.UseModeGraphic(eModePointer);
}


with also this:

Code: AGS
 if (theGui != gStatusline && mouse.Mode == eModePointer && mouse.GetModeGraphic(eModePointer) == 2061) 
{
  mouse.Mode=old_mode;


What I am looking for is to keep mouse active inventory graphic mode showing when going to close the inventory gui yet still maintain cursor mode for the rest of the buttons. If that makes sense?

Help appreciated.

Meanwhile I'm going to try this:

Code: AGS
   
if (gInventory.Visible==true && mouse.ChangeModeGraphic(eModeUseinv,2057 ))
{
 mouse.Mode = eModeUseinv;




#3429
Sorry Crimson old bean,

I'm not the sort to sit on bum and wait for an answer, well not unless I really need to,  so don't leave the forums I may need you in a later post (laugh)



#3430
Hi

I'm wondering why this Append fails to show up. It should be added to the Label Lmemory2 :

Code: AGS
  
Lmemory2.Text.Append("[[*Some text here.");


If you can help, cheers.

EDIT: This seems to do the trick:

Code: AGS
  
Lmemory2.Text = Lmemory2.Text.Append("[[[[[[*Some text here");


#3431
Hi

how can I do this without having the input box (String could say "Filming") as I just want to save the picture so I can cut around the npc with a bit of the background showing and use it as a Button and then animate it like watching a film?

Code: AGS
String input = Game.InputBox("Type the filename:");
input = input.Append(".pcx");
SaveScreenShot(input);


All help appreciated

EDIT: This seems to do the trick:

Code: AGS

Display("Filming.");
SaveScreenShot("wksbar1.bmp");


8-)

#3432
Mmm, not so good.

Babar, you'll have to get your own blue peter badge  (laugh)

#3433
If you have already created your room(s) then take a look at what is in it and decide if you want to add anything else or use what you have to give it an uplift.

I have to agree that most rooms are naturally quite quiet so you have to exaggerate things sometimes.

What objects are in the room? Where is the room located? Is there an open window? Has someone left the bath running? Is the location of the range near coyote's?  Are there horses there? Are there flies in the room? Is there a ceiling fan working? Are you quite close to an Indian reservation: smoke signals, beating drums etc? Maybe there is a piano? The list is endless.

You have had quite a few ideas thrown to you.

I think the music box idea is a great one (player can stop / start the music by opening or closing the lid). (laugh)

Good luck

#3434
The cursor change to pointer over GUI (with buttons) works and when off GUI changes to old mode works perfect my end.

So, that's the enigma...

Code: AGS
 
function repeatedly_execute_always() 
{
 // WHEN CURSOR OVER STATUSLINE GUI
 GUI* theGui = GUI.GetAtScreenXY(mouse.x, mouse.y);
 if (theGui == gStatusline && mouse.Mode != eModePointer) 
{
    old_mode=mouse.Mode;
    mouse.ChangeModeGraphic (eModePointer, 304);
    mouse.Mode = eModePointer;
}
 // then other stuff



#3435
Crimson,

someone is testing in both settings.

I came across a boolean oversight and corrected for the object interact (hand) that was failing.

That still does not account for the gui buttons which are of reasonable size.

FYI When cursor over the gui with buttons the cursor changes to pointer then returns old mode when leaving.

#3436
It was Global variable (maxchildren)and not starting game again from scratch.

It seems to be ok now  (nod)

cheers
#3437
I'm running:

AGS Editor .NET (Build 3.2.1.111)
v3.2.1, March 2011

maybe its an issue then?


#3438
Crimson

QuoteBTW, another thing, does your game use any plugins?
Flashilight 121 plugion.
I also use the Tween Module.

I am going to try to find what the solution could be / is.

cheers

#3439
QuoteDo you use any advanced drawing methods in your game? Raw drawing over guis, creating dynamic sprites? Any sprites with alpha channels, any objects with translucency?
No.

I'm using Win XP service pack2.

Am I advised to try and update to D3D (9) rather than sticking to DirectDraw as some on D3D seem to get problems?

What do you think?

cheers





#3440
Beginners' Technical Questions / Why oh why?
Thu 25/04/2013 11:40:44
It's all hell loose today  (roll)

Why oh why?

In setup choose DirectDraw5 as problems with D3d (people say) and I can't use it anyway.

Some say they can't interact (hand) with an object but can look use inv.

Some say buttons on gui are not working but are fine at my end.

Why oh why?



SMF spam blocked by CleanTalk