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

#1
thx for the help but it still wont work, it says there is an error in the script : expected "("


???
#2
hmm, first of all: thx a lot. You seem to know what you're talking about. I'm not quite sure if I could follow.
I added the following

function repeatedly_execute() {
  if GetGUIAt (mouse.100,mouse.100 == INVENTORY)
  SetCursorMode (MODE_USE);
SetMouseCursor (6);
}
but as you probably know (cuz you just read this messy party of my script) it didn't work.

what is wrong?
#3
hey just another short one:
my GUI's work all fine now, but when I enter (on mouse over) the INVENTORY-bar, the cursor should switch to pointer-mode (cursor mode 6)

I tried :
if (interface == INVENTORY) {
 
   SetCursorMode(6);

etc.....

but now the cursor only switches to the pointer-mode if a button was clicked. how can I define, that it should swich as soon as the player moves the mouse over the inventory-bar?
#4
hmmm, I simply restarted the ags and now everything works fine. I hate those errors!!!
#5
it must be something with my order cause, no matter what bar I put first
(after "function interface_click(int interface, int button) {") that one works.
If I put the iconbar right after that function-call it works but can't be opened by the click on the option-button and if I put the inventory-bar first I can use the option-button to make the iconbar popup, but then the iconbar is useless, cause none of the buttons work. they're just like static.
#6
heh thx, but I tried that already. but then the modyfied iconbar pops up an none of the buttons are workeable

here is the script.


function interface_click(int interface, int button) {
 

if (interface == INVENTORY) {
    // They clicked a button on the Inventory GUI
   
    if (button == 2) {  // show inventory
     GUIOn (ICONBAR);
}
   
     
    if ((button == 3) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
      // scroll down
      game.top_inv_item = game.top_inv_item + game.items_per_line;
    }
    if ((button == 4) && (game.top_inv_item > 0)){
      // scroll up
      game.top_inv_item = game.top_inv_item - game.items_per_line;
   
       
    }


if (interface == ICONBAR) {
   
   
     
    if (button == 0)    // save game
      SaveGameDialog();
    if (button == 1)   // load game
      RestoreGameDialog();
     if (button == 2)   // quit
      QuitGame(1);
   
    if (button == 5)    // look away
      GUIOff(ICONBAR);
     

}  // end if interface ICONBAR






Do you have an idea whats wrong with it?

#7
hey folks, here I am again.
I was working on my game, trying to modify the gui. it was pretty simple so far, until I wanted to change major things.

So what I wanna do is therotecly simple.

I used the gui from a standard-AGS-Game. not when you move ypur cursor to the top of the screen, the ICONBAR will appear. but, I don't really need the iconbar for my game cuz, I have attached the INVENTORY-BAR to the bottom of the screen but I need the iconbar  for options like "save","load","exit" etc.
So what I want, is that the iconbar pops up into as a small window, wenn the player clicks on an "option-button" on my (always visible) Inventory bar.
But it is the other way round. I can let the Inventory-window appear by clicking on a button in the iconbar. But, as I said, I want the (smaller) Iconbar appear, when the player clicks on a button in my "inventory-bar".
Everything I tried so far, failed.
I read a bunch of tutorials for making gui's but, they don't handle those kind of function.
has anybody an idea?

It just has to be something like

if (interface == IVENTORY) {
    if (button == 2) {  // show iconbar
      show_iconbar_window();

But that didn't work out. Where do I have to declare the "show_iconbar_window-function"???

I really need some help.
#8
yeah, it works real fine. FAAAT. great thx man!! you're my hero for today...or until I have another stupid question  ;)
#9
well it's me again. with a simple problem I can't solve.
I know this problem has been discussed before, but I couldn't find a working solution...probably cuz I'm an idiot.

I want to animate an object (doors of an elevator).
it should start animating (doors shall open) whhen the elevator button was clicked (interact with button).

So far no problem, but how the heck do I make an object loop?
I animated the character in many ways, but that was simple, I just added a loop to another view of the character. how do I do this with objects?

does anyone now a short, simple script and where to paste it?

what I have so far are 5 pictures of the elevatordoors. each one symbolises a frame for the animaton. how to go on

???
#10
i figured the best solution out later last night:

draw a second walkable area. go to
room settings set the top edge of the screen right at the bottom of the door. than

-->interaction editor
walk off top screen edge
- player - go to different room (2)

(first time) player enters the screen
- run script
script:
"
{
  RemoveWalkableArea(2); }
"

objects --> interactions:
- Character -  move character
- character - quick animation
- object - remove an object from the room
- run script:
script:
"

RestoreWalkableArea(2);

"

description:

now when the player enters the room (for the first time) the walkable area 2 is disabled and after the player opend the door, the interactions of the object cause the restoring of the second walkable area. when you walk on that area you cross the top edge of the screen, leave room 1 and enter room2.

thanks at all who tried to help
#11
i already tried that, but i didn't, but i figured the best solution out later last night:

draw a second walkable area. go to
room settings set the top edge of the screen right at the bottom of the door. than

-->interaction editor
walk off top screen edge
- player - go to different room (2)

(first time) player enters the screen
- run script
script:
"
{
  RemoveWalkableArea(2); }
"

objects --> interactions:
- Character -  move character
- character - quick animation
- object - remove an object from the room
- run script:
script:
"

RestoreWalkableArea(2);

"

description:

now when the player enters the room (for the first time) the walkable area 2 is disabled and after the player opend the door, the interactions of the object cause the restoring of the second walkable area. when you walk on that area you cross the top edge of the screen, leave room 1 and enter room2.

thx at all who tried to help
#12
the last four rows are senseless, pls ignore, I pasted them and didn't realised that they were still at the bottom of my comment.  ;)
#13
heh folks, I got another tricky question for ya:

I want a theoreticly simple thing, but I just can't figure out how to do it:
I want my character to open a door by clicking on it. so far no problem:

I created a object (picture of closed door) and put it over the background at the position, where the background shows an open door.

on
interact  object-->
- Character -  move character (moves character in front of the door
- character - quick animation (animation how he moves his hand to open the door)
- object - remove an object from the room (lets the closed-door-objekt disappear)

Here comes the problem: when the door is open, I want the player to be able to move my character through the door into the next room.

solutions that didn't work:

1. interact  object-->
- Character -  move character
- character - quick animation
- object - remove an object from the room
- player - got to a differnt room

(doesn't work, cuz now he enters the next room, just wehen he opens the door. thats not what I want)

2.
interact  object-->
- Character -  move character
- character - quick animation
- object - remove an object from the room

then a hotspot over the door-region and

interact with hotspot
- player - got to a differnt room

(doesn't work, cuz now I have to use the interact function to walk in the next room. I want it to work with the "walk to-function"

3.
make baseline for top-egde 

walk off the top screen edge
player - go to a different room

(doesn't work, cuz now I have to declare a region at the opt of the top-screen-edge as a walkable area and if I do so, the character can walk over the door, what looks really stupid.

has anybody an idea, how I can do this. and pls don't tell me, that there would be an easier way by just use my first solution and just let the caracter enter the room by interacting with the door-object.

I know it works, cuz in zak mc kracken, its done, with just the first door.(the one through which he leaves his sleeping-room)
So, it CAN be done....but how?!
please help

interact  object-->
- Character -  move character
- character - quick animation
- object - remove an object from the room
#14
great thx man, the one with the Interaction Editor worked out pretty well. thx a lot.
#15
hey, this is an easy one:
I want my character to to kneel down or to bend down, when he's picking up SOME objekts. how do I do this? I tried to make new loops for that, but they were already declared as something (f.e. up,down etc....I already have those, this was just an example)
so, hot to tell my character to get down while taking theese objects???
SMF spam blocked by CleanTalk