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

#21
Yea, that's it! Thankyou once again :)

sorry for my english, it's hard to explain all that technical stuff!!
#22
Ok, I know how Global Ints work (thanks for the script editor tip!), but I'm just asking if I can retrive the value of a global VAR (the ones you use in the ags editor) from a script.
I set a global var with the editor, and I have to retrive the value in a script. The options are:
1) it can be done (how?)
2) it cannot be done: if I know that a certain value must be retrived with a script, I MUST use a global int (not a var) to SET it too.
wich one of those is true?
#23
umm... I don't think I understood very well.

Are you saying I can't get the global var value froma a script and I have to use a Global int from the beginning?
Can't I set an event to change a global var if I know the value will be retrived by a scipt? Have I to use scripts for the beginning using Global ints?
#24
Let's suppose I set a global var to 1 in AGS editor, let's say I call it "box open" because it turns 1 when a box is opened by player.
Now I have to run a SCRIPT (not a normal interaction with conditional) that does something if global var is 0, and something else if it's 1.

My question is: how to handle conditionals in script? How can I put in the code "if box open is 1 then do this"? I tried with:
if (box open == 1)
but it doesn't work. It doesn't work too if I use
if (1 == 1)
(box open is the global var n. 1). I also tried:
if (GetGlobalInt(1)==1)
but it doesn't work as well.

It can be done? How?

thanx


oh and another question that doesn't concern the topic: there is no "display speech" command in the list in ags editor interactions. is that right? that's strange.
#25
Thakyou very much! The code for the non-blocking actions works very fine.

Sadly, the displayspeechbackground doesn't fits very well for many reasons. Hope the "all specch is background" option will be aviable on next version of ags (i saw it on the "future" doc).
#26
Thanks Pumaman, I tried that, but there a big problem: there is no way to get the sprite number of the object i clicked. I mean, there a SetInvItemPic but no GetInvItemPic!

Here's the code that should be on_mouse_click for the leftinv button:

     else if (player.activeinv==-1) {
       SetActiveInventory(invitemclick);
       ChangeCursorGraphic(MODE_USE, GetInvItemPic(invitemclick));
       SetInvItemPic(invitemclick, 2042);

this should work fine, but, of course, there is no "GetInvItemPic".
What did you mean with the above post? How can I retrive the item sprite to set it for the cursor?
#27
I don't mean the multi-inventory support (I don think it's possibile with the actual version of AGS), but the way you can take items from inventory.
In discworld when you pick an item from inventory to use it, the inventory just disappears and appears only on the cursor.
I attempted to simulate this stuff on my interaction system, but I don't know even if it's possibile.
I attempted two eays, and both are laking somewhere:

1) the more simple. set active inventory the item i just clicked, and delete it from inventory, hoping that it remains on the cursor. it is not: the active inventory MUST be an item you have in the inventory (maybe it should be changed on the next version of AGS?)

2) the more complex: change the image of item i picked to a "trasparent" one, and change it back when you put it back in the inventory, but this way doesn'to work too. The image on the cursor will change too and you will have an invisible cursor.

Any idea?

thanx
#28
Excuse me if I interfer with the thread, but:
i didn't know that it's possible to make a non-blocking lucas-style speech.
I mean, everytime I look at and hotspot, even if "skip speech" is "can't skip" (like in lucas games should be), the character just stands here and talks, without moving even if I click somewhere.

And another question that may be related to the above one: when i click on some hotspot and activate an event, the character walks in that direction. But if i try to block the action and detour the charater somewhere else, i find the action, once started, cannot be stopped (like in sierra games, but dislike lucas and discworld). is it possible to set-up the thing so the event, once started, can be stopped by another (i mean: while the player is walking to approach a hotspot and perform event, if i click somewhere else, i want the chaacter to abort the previous action and perform the one i just clicked).


thankyou
#29
Ok, i finally made it! It works fine, but I think there are some AGS built-in limits that prevents me from making it a 100% discworld-like system (all written in the readme, btw). Check it out:

http://helcaraxe.altervista.org/ODISv1.00.zip

Thankyou all for the help! AGA if you find something that would come in hand for you, just use it. But if you have scripted some discworld interface feature that is NOT there... well, tell me! :)
#30
Thakyou all! I finally made what I had in mind.
It's a Discworld-like interaction system (now you can see wat i mean in my questions :)
It works fine, now, check it out:

http://helcaraxe.altervista.org/ODISv1.00.zip
#31
Beginners' Technical Questions / GUI order
Sun 10/08/2003 22:29:44
Maybe it's a stupid question, but is there any way to change the GUI order after they had been created?
I noticed that newest GUIS (with higher number) are displayed OVER oldest ones in the game, so che GUI order is VERY important. Sadly, i noticed too there is no way to change the GUI order (make GUI1 to be GUI3 and so on) without manually change and re-do the GUIs.
Am i right?
Is the thing scheduled for the future?
#32
Tried. Ok, you gave me a script to "interact" the inventory if there is interaction, and to "use" if there is no interaction scripted, right?

But my question was much more simple (i think):
i really can't understand how the "use inventory item" works, and i think there is no tutorial in ags help that explain it, because they all assume that i'm using the standard sierra inventory or at least a normal system with no "handle inventory etc" enabled.
What i'm asking is how to:
1) make an inventory object active (in which mode the cursor have to be? what script must be run?)
2) keep the selected object active with its sprite on the cursor (the cursor mode must be the same as above?)
3) use the selected object on another inv object or hotspot (cursor mode? what interaction must be selected in thetarget hotspot?)
all with scripting, because i had to turn on "handle inventory.." for many reasons and all that stuff doesn't work automatically, i must script it!

is there any tutorial that explains how the thing works? or at least is there any "demo" game (whit the ags file) with the "handle inventory" turned on?
if not, pleeeze explain (stryker@ctonet.it / 13203225 if it's a long story and someone would discuss it in private)!

thankyou!
#33
Thankyou, i'll try that!
#34
Actually, a thing or two is already done:
-double click event emulate (with a timer script: if you click a second time before the timer is over, here's the diuble click, and it works fine, at least in the actual game screen)
- semi-trasparent inventory pop up and dragging (actually the dragging "style" is not EQUAL to discworld, but it's not bad)
- and i found a tutorial to make the "sparkle" pointer too

but there are things i think one can't make with AGS are (PLEASE if anyone does know that is POSSIBLE just tell me!):
-hotspots name like in discworld (fixed upon every hotspot and not mouse-following)
-inventory-style (you pick an object from inv, the object is on your pointer but disappears in the inventory, and reappears when you put it back)

now i'm a bit stuck with the inventory objects interacting (see the beginners tech forum :), but the real problems with my goal are the two above i think.
#35
Hi all,
for many reasons i had to turn on the "handle inventory clicks in scripts" options, to make more customizable invenotry events.
Everything works fine BUT the MODE_USEINV thing. For now (it's only a test, to find out how the hell that USEINV works) i made the rightclick call the MODE_LOOK (and it works), and the leftclick call the MODE_USEINV, but it doesn't work. when the inventory pops up the mouse is already in USEINV (4) mode, but when i leftclick on an inventory objects it does nothing: the pointer keeps look like an hand, and doesn't pick up the object from the inventory.

this is the code in on_mouse_click:

else if (button==RIGHTINV) RunInventoryInteraction(game.inv_activated,1);
     
 else if (button==LEFTINV) RunInventoryInteraction(game.inv_activated,MODE_USEINV);


what i'm missing?

thankyou

(sorry for my english)
#36
Hi all, i'm trying to make a diskworld-like interface (double-click event, inv pop up, inv dragging, and all). This stuff is very difficult to me (i just started some days ago, i'm not very scripting-skilled), so i want to be certain that there are no other similar projects around to download to skip that huge work.

thankyou
SMF spam blocked by CleanTalk