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

Topics - Kikutaâ„¢

#1
Hey.

I've created two text boxs, differents, in the same gui, implemented the their instructions. Everything went well except the fact that when I click in one TextBox and start writing, the same thing appears in both of them. I could, in fact, split them into 2 differents Gui, but I don't want. :P

So, does anyone here had a smilliar problem ?
#2
I'm tring to convert, in ags, a float var into a int.
In C, i use the floor, that uses math.h

So, how can i import a C++ lib into ags ?
#3
Hello!

I would like to know if there is any possible way to get a value from an int var used in a saved game.

I want that because I need to get the time played in a saved game (the time is stored in tempo_jogado var) , to be displayed when the game starts (before loading the saved game).

Thank you.
#4
Hi :)

Ok, i got several questions.

1st-> I made a lightbulb blink in a cenario. I made it as an object, instead of using the background animating. The lightbulb blinks randomly and it has sound. It's all ok, except on thing. I've made a region below the light, so as it blinks, the character gets the light. But since it's random, it's a bit difficult. I've code this :
Code: ags

if (GetObjectGraphic(0)==152) SetAreaLightLevel(1,110);

Teoricly, it works, but it doesnt work. I dont know if the problem is from the function AnimateObject.



2nd-> I've made a costume inventory screen. Everythings works fine, except one little thing. If the inventory item image is too big, when i click in the bottom part and lright part of it, it reacts as if it's clicking on nothing. I think that if the image is bigger than 50*50 when you click out side the 50*50 area , the on_click_event doesnt run (i think!)

Is there anyway i can change it ?

3rd-> If i copy the example of StrCopy to the beggining of the main global script file, it gives " parce error". I dont know why. The code is :
Code: ags

string message;
StrCopy(message,"This is a message"); 

Anyone knows why does this happen ?


That's all! Thank you for reading this, and sorry about my english :P


#5
Hi, I've been having this problem since I started making my game, I searched the forums
for a solution without any luck.

Most of my objects wont align
exactly where I want them to, they usually jump a pixel or two to the left or right,
whether I position them manually or with scripting.

Pixel perfect alignment is necessary due to the nature of my objects. in order to avoid
aliasing on them I save the object PCX with the surrounding area of the room.
So if the scenery area of the object doesn't fit perfectly with the actual scenery its
easy to spot the mistake.

My game is 640x480 32bit, and my desktop resolution is 1152*900

Any help would be appreciated.
#6
I am trying to do my inputbox, instead of Ags default one, but i cant understand a thing.

I've created a new Gui with a TextBox. When i call the gui, i can instantly write on the textgui, but if i press "enter", it doesnt do a thing. I was expenting that, so i scripted in "on_key_press" event, this :

Code: ags

if (IsGUIOn ( 8 )==1){
                if (keycode==13){
                                     GUIOff( 8 );
                                     GetTextBoxText (8,0,string);
                                     SetTextBoxText(8,0,"");
                                      }
}


But when the TextBox is up, it ignores the key_press, which is obvious.
So, my question are: can i do my own InputBox, or if i can, where can i script the "press enter" in TextBox to do something?
#7
I've made a sound for footstep, and i've put in the character's view to play the sound in certain frames.

I named the file name to "SOUND1.WAV", and when i play the game and open the debug console, it appears "FAIL loading sound 1"

Why is that ? I've rebuild the VOX files, sou i dont know what the problem is.
#8
Well, i was just thinking. Is there a way to script like , an inventory screen, that is 30% transparent and make the inventory item not transparent ?

And btw, when u click the left button over a  inventory window, is it LEFTIN or just LEFT? Because i'm having trobles with it and it doesnt work in either :P Maybe my mistake.
#9
Well, i hate to post thing here, i prefere discorvery myself, but this it's my last resort. As i said in my last post, i made a new inventory GUI. I add a new item to my inventory list, but when i click in it, it doesnt happen anything! It is suppost to "pick up" the item from the list!

I've tried to comment everything on_mouse_click except the part you press the left button ad still doesnt happen. I've seen the code of three diferent games and i dont see any specific funtion to get the item! It is only suppost the left click, and pick the item, right ?

//Edit:

I've discovered. When you pass the mouse into a hotspot, character,inventory item or object, the mouse pointer becames red, so, the mouse didnt pick up the mouse.
Sorry :P
#10
I've created a new game using blank template, so i didnt had any gui already made.
I've created an inventory gui, all from scratch. I code it and everything. But it when i press the right buttonÃ,  (it does InventoryScreen() ) it always gives an error that i cant understand.

The error is this:

"ERROR: InventoryScreen: one or more of the inventory screen graphicsÃ,  have been deleted"

No matter how i do it always gives this error. I even tried to rip the default inventory gui just to check if it was my error. It gives the same old error. I've also tried to take the background image and the button imagens and nothing.

Did anyone seen that this error is ?
#11
Ok, this is the part i hate the most when i code.
I hope to find solutions although i dont expect any.

Ok, this is it. I've made a background image with 500 height. And i want to open a gui in the position of mouse.x, mouse.y . But if the mouse is on the edge of the screen, the gui opens out of the screen, so i want to change that.
I start to put in repeatedly_execute  this

if (mouse.y >= (game.room_height-51)){
             SetGUIPosition(2,mouse.x,game.room_height-51);}

But.... since room_height is bigger than 300 (as normal in a 640*480 game) the game doesnt recognize the mouse.y position!

I've made a test. This one :  if (mouse.y > 200) Display("miau"); And it worked, but if i change it to 250, the display doesnt appear......

Oh, and i have to say, i've made a gui that is always (mouse.x, mouse.y) position, and if i put an hotspot, like in, x=200 and y=400, the label in the gui shows correctly the name of the hotspot, so the mouse.y workes there.

I just want an answer. Is it a coding mistake (i hope so!) or just a bug ?
Pardon me for the bad english.
#12
Hi

I am having troubles scripting how to make the double click work and i cant script a "hold click" function.

I have looked everwhere for a function that could make my life easy but i cant find it :P
So, i was hoping that you guys could help me to script that .

thanks :)
SMF spam blocked by CleanTalk