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

#1
Thanks Khris.
I could only change the property nr to 0 or 1 cause it was boolean.
Now I changed the type to number and it works.
I had only to add a i > 0 instead of i ==1 and change the exit number for no exit hotspots to 0...
int old_e;
// put anything you want to happen every game cycle in here
function repeatedly_execute()
{
  Hotspot*h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
 int e = h.ID;
 if (e != old_e) {   // mouse moved over hotspot or left one

   old_e = e;
   int i = h.GetProperty("exit");   // read entered number
 

   if (e == 0) mouse.ChangeModeGraphic(mouse.Mode, 2);  // default cursor graphic

   else if (i == 0) mouse.ChangeModeGraphic(mouse.Mode, 2);  // mouse over hotspot but not exit

   else if (i > 0) mouse.ChangeModeGraphic(mouse.Mode, 4 + i);  // change to arrow

Thanks a lot.
#2
Thanks again.
I've read all and tried to understand.
i = True or False 0 or 1 is this correct?
I've tried this, but it  only worked on room 1. in room 2 it seems like it displays an arrow image less than 1 second.
I have to think why this happens. Perhaps you can help me, Thanks.
Perhaps, the exit4 value is set to 0 after 1 loop.
int old_e;
// put anything you want to happen every game cycle in here
function repeatedly_execute()
{
   Hotspot*h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
  int e = h.ID;
  if (e != old_e) {   // mouse moved over hotspot or left one

    old_e = e;
    int i = h.GetProperty("exit");   // read entered number
    int j = h.GetProperty("exit2"); // for the 2nd arrow
    int k = h.GetProperty("exit3");
    int l = h.GetProperty("exit4");

    if (e == 0) mouse.ChangeModeGraphic(mouse.Mode, 2);  // default cursor graphic

    else if (i == 0) mouse.ChangeModeGraphic(mouse.Mode, 2);  // mouse over hotspot but not exit

    else if (i == 1) mouse.ChangeModeGraphic(mouse.Mode, 4 + i);  // change to arrow
    else if (j == 1) mouse.ChangeModeGraphic(mouse.Mode, 5 + j);
    else if (k == 1) mouse.ChangeModeGraphic(mouse.Mode, 6 + k);
    else if (l == 1) mouse.ChangeModeGraphic(mouse.Mode, 7 + l);
   
  }
}
#3
Thanks for all the answers.
I don' understand much of what you described. Is the Scripting language C#?
I only have some experience with Blitz Basic, which I've choosen, cause it's easier to understand.
I tried to add the code of dualnames, but AGS said always: unexpected if.
The code of monkey... worked and that helped me, yes.
The code of Khris is very complicated.
When I copy the code:
int i = h.GetTextProperty("exit");   // read entered number  - Type mismatch: Cannot convert string to int.
I would like to understand what it does:
// global.asc, above repeatedly_execute

int old_e;
- defines old_ e = number

// global.asc, inside repeatedly_execute

  Hotspot*h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
- I don't know what hotspot*h is.
- Hotspot.GetAtScreenXY(mouse.x, mouse.y) - You create hotspot as part of getatscrean which gives us the xy coordinates of the mouse.
- hotspot*h would then be a new type defined as part of getatscreen?
  int e = h.ID;
- you write the hotspot-ID in a variable e, which you create at the same time.
  if (e != old_e) {   // mouse moved over hotspot or left one
- If, what's "!"?, e! is equal to old_e and I think old_ e= 0, cause we haven't give old_e a number.
    old_e = e;
- old_e get's the hotspot number
    int i = h.GetTextProperty("exit");   // read entered number
-  We create variable i and transform some text of the hotspot, i don't know which and try to write it into an int-variable?

    if (e == 0) mouse.ChangeModeGraphic(mouse.Mode, DEFAULT_SLOT);  // default cursor graphic
- If e = equal 0 then the mouse cursor stays standard

    else if (i == 0) mouse.ChangeModeGraphic(mouse.Mode, LOUPE_SPRITE_SLOT);  // mouse over hotspot but not exit
- when e is not 0 and if i = 0 then mouse.mode (which seems to change the picture and use of the cursor) use the new? variable LOUPE_SPRITE_SLOT?

    else mouse.ChangeModeGraphic(mouse.Mode, FIRST_EXIT_ARROW_SLOT_MINUS_ONE + i);  // change to arrow
- when e and i are not 0 then the mousegraphic (and use) will be changed to an arrow and the nr= i.
- where can I define the numbers of the arrows, or connect "FIRST_EXIT_ARROW_SLOT_MINUS_ONE" with a picture.
- Where can I find "i"?
Just a couple of questions to the script, but thanks.

  }
#4
Hello,
I wanna make an adventure. I wanna walk through pics - From one to another...(Like 1->2  and 2<-1, but also 2->3 and 3->1)
I wanna use no character, just the mouse.
My Questions:
1. Can I remove some mouse pointers? I just need one. This one changes the picture. Or perhaps later one, which does something, but
    When pointer over hotspot and picnr of mouse= 2 + mouseclick then do something)
2. How can I change the mouse picture when it's over a hotspot?
    (I wanna show an arrow pointing to the left side(when it's over the hotspot on the left side of the picture...) or an loupe when it's over something to examine.)
A reason why I wanna change the mouse cursor is that I wanna show here is something you can click at and also show the user what he can do with the hotspot.
I hope you understand what I mean.
Thanks Kurdt.
SMF spam blocked by CleanTalk