Would a full screen animation really slow down the game?
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 MenuQuote from: zabnat on Mon 25/08/2008 06:32:56
You could use Character.IsCollidingWithChar function in rooms repeatedly execute to check if monster is colliding with player character. This isn't pixel perfect collisiondetectiong as it only checks if baselines are overlapping.
Quote from: Sektor 13 on Tue 15/07/2008 20:03:08
Hey
I was wondering if (or how) it s possible to specifiy a GUI and only a button graphics for the engine too look.
I don't want to specify a exact button, but only the NORMAL GRAPHICS parameter !
I have a custom gui, and inventory slots will be actual buttons, as there are many inventory items available in random order to pick up (so button one can be a BUCKET, STICK, or anything else), i want to make script shorter, so i want for AGS to only look for specific button graphics not the button name.
hope this makes any sense
int i = 0;
while (gYourGUI.Controls[i] != null)
{
GUIControl *control = gYourGUI.Controls[i];
if (control.AsButton != null)
if (control.AsButton.Normalgraphic = 5)
{
//What to do if so
}
i++;
}
Quote from: egamer on Sun 13/07/2008 18:35:44The LucasArts interface is like that (in old games, from Full Throttle the thing starts to change), because they didn't use different cursors for each mode, they rather treat the actions as a automatic text box, being default ALWAYS the default action if you try to use "nothing" or after finishing doing something.
I have one comment, though: I've never played Lucas Arts games, so I've never used a Lucas Arts interface. But I don't like the interface in your game as much as the standard Sierra interface. The Sierra interface is more convenient to use, first, because you can right-click through the cursors, and, second, becuase it is easier to try an inventory item on more than one thing. In your interface, to try an inventory item on more than one thing you have to click on "Use," click on the inventory item, and then click on the room each time you want to try to use the time. In the standard Sierra interface you only have to go through that once, as the inventory cursor persists. The same is true for the other cursors. In your interface, the cursor reverts to "Walk" each time you use it. Also. I like the graphic cursors better then the crosshairs with text at the bottom of the screen.
Quote from: help fileThere is also another special use for this command. You can pass the special value FOLLOW_EXACTLY as the DIST parameter rather than passing a number. If you do this, then CHARID will always remain at exactly the same X and Y co-ordinates as CHARTOFOLLOW. This might be useful for effects such as a temporary halo over the character and so forth.So making non-clickable characters using the clothes' sprites and make them follow the character that wears it would do it. You would need as many characters for each cloth as characters that can wear it.
If you use FOLLOW_EXACTLY, then EAGERNESS has another meaning. If you pass 0, CHARID will be drawn in front of CHARTOFOLLOW; if you pass 1, it will be drawn behind.
Quote from: KhrisMUC on Sat 12/07/2008 17:25:53
He mentioned it: cSophie.
Baro:
You're using these lines:to make the three characters walk simultaneously. The thing is, when a cutscene is skipped, every command is executed in "zero" time. Obviously, a non-blocking walk isn't really compatible with this method. Code: ags cSophie.Walk(130, 50, eNoBlock, eWalkableAreas); cSou.Walk(70, 50, eNoBlock, eWalkableAreas); cBear.Walk(100, 50, eBlock, eWalkableAreas);
You need to look which character reaches their destination last if the cutscene isn't skipped, then make their walk blocking. This should fix it.
Quote from: Mazoliin on Mon 07/07/2008 20:19:20
You could do this:
Set up a transparent gui with a label on it, and name the label something suitable.Code: ags //In the script header import function LookInv(String invlook); //In top of the global script function LookInv(String invlook){ lblSayInv.Text = "%s", invlook; gSayInv.Visible = true; SetTimer(1, ((invlook.Length/game.text_speed) + 1)*GetGameSpeed()); } //repeatedly execute always if (gSayInv.Visible == true){ if (IsTimerExpired(1)){ gSayInv.Visible = false; } } //In the "look" interaction of the inventory item LookInv("Hey, this is what will be displayed");
But make sure that the labels gui has a higer Z than the inventory, so it will be placed in front of it.
function SayInventory (String message){
SayLabel.Text = message;
invsaytimer = 0;
invsaytimermax = (message.Length * 4);
}
if (SayLabel.Text != "")
if (invsaytimer == invsaytimermax) {
SayInventory("");
}
else {
invsaytimer++;
}
Quote from: Akatosh on Mon 07/07/2008 16:55:08With that code, the inventory is not visible while the character is speaking.
This should do the trick:Code: ags //Put this in your inventory item's "look" interaction gInventory.Visible=false; //The name of your inventory GUI //If there are any other GUIs visible, too, repeat for them Wait(1); player.Say("It's a key!"); //The speech you want to be displayed gInventory.Visible=true;
Quote from: Dualnames on Fri 04/07/2008 21:01:48
Well, ok, let me be of more service to you.
Global script:
function mouse_click(Mousebutton *button) {
if (button==eMouseleft) {
ProcessClick(mouse.x,mouse.y,mouse.Mode);
}
}
//you want space to trigger left mouse click
function on_key_press(int keycode) {
if (keycode==32) {
ProcessClick(mouse.x,mouse.y,mouse.Mode);
}
}
Quote from: HELP FILEProcessClick
NOTE: This function ignores all interfaces and acts as though the point is directly visible. In other words, if the co-ordinates you pass happen to lie on a button on an interface, what actually happens will be as if the user clicked behind the interface onto the actual screen.
Quote from: KhrisMUC on Fri 04/07/2008 15:24:44That code doesn't work (the maths are incorrect, mouse.x and y are readonly (although I tried to create two variables and didn't work either), and left_click() doesn't exist)
Code: ags int move_by=5; int k=keycode-371; if (k>=0 && k<11 && k%4!=3) { mouse.y-=(k/4+1)*move_by; mouse.x+=(k%4-1)*move_by; } if (k==5) left_click(); ...
Afaik, on_mouse_click isn't called if the mouse is over a clickable GUI. It's not possible to invoke a left click directly, you'll have to manually check what's at the mouse's location, going through GUIs minding their z-order & clickable property. I'm not sure if there's a way to call a button's OnClick that way, let alone clicking on the scroll buttons of listboxes and stuff like that.
After the GUIs are out of the way, it's fine to call on_mouse_click.
+: 43
-: 45
Quote from: Dualnames on Fri 04/07/2008 16:23:02That's the first thing I tried, but it's a processclick, so it still goes through the GUI.
you whatever you put as on_mouse click
if (mousebutton==left) {
}
put it as mouse click left button.
Quote from: SSH on Fri 04/07/2008 16:17:37How do I use those controls?
Wouldn't it be easier to turn on Window's built-in accessibility controls that do the same thing?
Keycodes of typable characters can be easily done in script like this:Code: ags if (keycode=='+') { // do stuff }
if (keycode==372) mouse.SetPosition(mouse.x, mouse.y-5); //8
if (keycode==380) mouse.SetPosition(mouse.x, mouse.y+5); //2
if (keycode==375) mouse.SetPosition(mouse.x-5, mouse.y); //4
if (keycode==377) mouse.SetPosition(mouse.x+5, mouse.y); //6
if (keycode==371) mouse.SetPosition(mouse.x-5, mouse.y-5); //7
if (keycode==373) mouse.SetPosition(mouse.x+5, mouse.y-5); //9
if (keycode==379) mouse.SetPosition(mouse.x-5, mouse.y+5); //1
if (keycode==381) mouse.SetPosition(mouse.x+5, mouse.y+5); //3
if (keycode==376) on_mouse_click(eMouseLeft); //5
if (keycode==13) on_mouse_click(eMouseRight); //Enter
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.111 seconds with 15 queries.