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

#2881
Take your pick:

http://www.neckties.com/foldinginfo.htm

Or, following blackbird's link, a little R2-D2 sticking out of your top pocket would be quite stylish, I think.
#2882
OK, so I know you've given up on the idea, but I had a go any way:

in the global rep_ex:
  if (GetLocationType (mouse.x, mouse.y) == 0) GUIOff (GUI4); // turns GUI off if there's nothing there
  else {
    SetGUIPosition (GUI4, mouse.x+15, mouse.y);
    GUIOn (GUI4);
  }

Where GUI4 is the mouse-following 'status line', with a text label containing '@OVERHOTSPOT@', wide enough to handle whatever object/hotspot/character names you have.

Might be some use, if you change you mind, or maybe to someone else.
#2883
I don't know if I totally understand the question, but if I do the way to sort it would be to create a new view using walking up sprites in the down loop (loop 0), and set EGO's view to that for this walk, e.g.:

SetWalkBehindBase (2,300);
SetCharacterView (EGO, 4); // where 4 is the 'reversed' view
MoveCharacterBlocking (EGO,200,168,1);
ReleaseCharacterView (EGO);
NewRoomEx (7,256,117); 

Does that make sense? Am I close to what you wanted? Hopefully it's some use, anyway.
#2884
I meant what dikla said, but she might've put it better.

DON'T USE A HOTSPOT IN ROOM 2, use the Player enters screen (before fade in) interaction and make it:

do the following comand
character- Change character view


where character : Main player character (EGO),
view number: Motorboat walking (sailing? whatever) view (UTURN).
NOTE: don't use 'set character view'

This way, you're not actually changing the character, just how the character looks. You could use different characters, but that's a lot harder to manage without scripting everything.
#2885
Try:
Room 1 hotspot (or whatever)
  Go to room 2
(exactly as you have now)

Room 2
     Player enters screen (before fade in)
          Character - Change character view (EGO, UTURN)
(you mayhave to use the view number for this, rather than the name)

See if that works any better.
#2886
Well, I said two different things, which one did you do?
What interactions do you have for leaving room 1 (and what script, if you're using a runscript)?
#2887
Just a small correction, I think it should be:

-Condition - if chest_open is 0, open it, give points, add items blahblahblah, set chest_open to 1, close chest, STOP RUNNING MORE COMMANDS

-Condition - if chest_open is 1, open it, display message, close it.

Otherwise, it goes straight onto 'if chest_open is 1', as rock_chick said. Alternatively, put 'if chest_open is 1' before 'if chest_open is 0'

-Condition - if chest_open is 1, blah blah blah
-Condition - if chest_open is 0, blah blah blah
#2888
Advanced Technical Forum / Re: Gui script
Tue 24/08/2004 20:21:20
And / or use a combination of StrContains Ã, and Run(object/hotspot/character/inventory)Interaction commands, e.g.
Code: ags

 Ã, // script for object2: Talk to object
string name;
InputBox ("Name?", name);
if (NumCheck (name) == 1){
 Ã, Display ("Hi, %s!", name); // No numbers, so run script
 Ã, // other things
}
else { // Numbers, so run error script
 Ã, Display ("No numbers");
 Ã, RunObjectInteraction (2, MODE_TALK); // Starts script running again
}

Where NumCheck is a custom function that checks the input for numbers. Looks something like this:

Code: ags

function NumCheck (string input) {
 Ã, if (StrContains (input, "0") != -1) return 0; // Returns 0 if 0 is in line
 Ã, else if (StrContains (input, "1") != -1) return 0; // Returns 0 if 1 is in line
 Ã, else if (StrContains (input, "2") != -1) return 0; // Returns 0 if 2 is in line
 Ã, else if (StrContains (input, "3") != -1) return 0; // Returns 0 if 3 is in line
 Ã, else if (StrContains (input, "4") != -1) return 0; // Returns 0 if 4 is in line
 Ã, else if (StrContains (input, "5") != -1) return 0; // Returns 0 if 5 is in line
 Ã, else if (StrContains (input, "6") != -1) return 0; // Returns 0 if 6 is in line
 Ã, else if (StrContains (input, "7") != -1) return 0; // Returns 0 if 7 is in line
 Ã, else if (StrContains (input, "8") != -1) return 0; // Returns 0 if 8 is in line
 Ã, else if (StrContains (input, "9") != -1) return 0; // Returns 0 if 9 is in line
 Ã, else return 1; // No numbers, so return 1
}


Although there may be a more elegant way to search for all numbers at once.
Works for me, anyway. Feel free to use it if it's any good for you.
#2889
That code works with my inventory GUI, which is popup modal. It just doesn't work if you click while over the GUI

I thought on_mouse_click didn't usually do anything when non-normal GUIs were up as they pause the game, and this bit
Code: ags
if (IsGamePaused() == 1) {
Ã,  Ã,  // Game is paused, so do nothing (ie. don't allow mouse click)
Ã,  }

stops it processing when the game is paused. Which is why I put a line before that.

EDIT: I don't mean this post to sound narky, which it might, I'm just saying the code I posted does actually work, kind of.
#2890
Or, you add a line before if (IsGamePaused() == 1), e.g.

Code: ags

function on_mouse_click(int button) {
Ã,  // called when a mouse button is clicked. button is either LEFT or RIGHT
Ã,  if ((button == RIGHT) && (IsGUIOn(2) ==1)) { // GUI is on so do this
Ã,  Ã,  GUIOff (2);
Ã,  Ã,  SetCursorMode (GetGlobalInt (1)); // Or whichever you used, resets cursor to what it was
Ã,  }
Ã,  else if (IsGamePaused() == 1) {
Ã,  Ã,  // Game is paused, so do nothing (ie. don't allow mouse click)
Ã,  }
Ã,  else if (button==LEFT) {
Ã,  Ã,  ProcessClick(mouse.x, mouse.y, GetCursorMode() );
Ã,  }
Ã,  else if (button == RIGHT) {
Ã,  Ã,  SetGlobalInt (1, GetCursorMode()); // Use another GlobalInt if 1 is taken
Ã,  Ã,  show_inventory_window();
Ã,  }
}


With this, right click will open the inventory, and a right click outside of the inventory will close it again. To make a right click on the inventory close it, I thick you have to play around with 'Handle inventory clicks in script'.
#2891
Nicely done, but wouldn't a hint system kind of defeat the purpose (of working it out for yourself).
Also, any chance you could make the input box clear itself after a new roll? Or am I just being very lazy?
#2892
I don't think you actually need the 'Player - go to room 2' command, since SetPlayerCharacter automticaly moves you to the room the new character (UTURN) is in. You just have to remember to use the 'Character - Move NPC to different room' command to position the other character to a new room, when you're done in the boat.

Alternatively, you could use 'Character - Set character view' when you enter room 2, to make the current character look like a speed boat. This might be a little easier than SetPlayerCharacter, as you won't have to move and re-position an NPC when you leave room 2.
#2893
You've missed the ; off the end of the line, which is probably why you get the error - the engine doesn't know that the line has finished, so the } is unexpected. You've done the same with the game_start line as well.

Also, the mum_talk variable hasn't been created properly, which will cause an error too. It needs to be declared outside all functions, exported from the Global Script, and imported in the Script Header (look up export and import in the manual for more details).

Hope this helps.
#2894
You need to edit the 'on_mouse_click' function in the global script, specificly the bit that says:

Ã,  else {Ã,  Ã, // right-click, so cycle cursor
Ã,  Ã,  SetNextCursorMode();
Ã,  }

If you want it to have a diffent function in every room, just change SetNextCursorMode() to whatever you want it to be. If you just want to disable scrolling in a single room, replace it with the code from the demo game (changing 100 to your room number):

Ã,  Ã, else if (character[ GetPlayerCharacter() ].room != 100 )Ã,  { // If not in intro room right-click, so cycle cursor
Ã,  Ã,  Ã, SetNextCursorMode();
Ã,  }

Don't forget to set the cursor you want in the 'Player enters room' interaction.
#2895
I think it's something like this (but with the right GlobalInts, and GUI / Label numbers, of course):

(in rep_ex)
string mana;
string exp;
StrFormat (mana, "%d", GetGlobalInt (2));
StrFormat (exp, "%d", GetGlobalInt (3));
SetLabelText (0, 1, mana);
SetLabelText (0, 2, exp);

And make two blank labels on the GUI.
#2896
Modifying Hotspots code a little:

(in rep_ex)
if ((IsKeyPressed(*) == 1) && (GetGlobalInt(1) == 0)) {
Ã, stuff
Ã, SetGlobalInt (1, 1);
}
else if (IsKeyPressed(*) == 0) {
Ã, SetGlobalInt (1, 0);
}

Works for me, but it might depend on what exactly you want to happen.
#2897
Yes, with the GetMessageText command, e.g.:

string buffer;
GetMessageText (501, buffer);
DisplaySpeech (EGO, buffer);
#2898
Ah, that might be my fault, sorry. It's been a while since I use the interaction editor commands, but now that I think about it, I think it processes 'Run Script' interctions after everything else, which would explain why it was happening last if that's how you chose to do it.
So, unless you want to learn scripting (which isn't a bad idea), you'll have to make a walkable area for the painting, and go back to the 'Object - Move object' interaction.
#2899
RAD Video Tools:
http://www.radgametools.com/bnkdown.htm

Converts avi to flc, and is free to download.
#2900
I think the problem is that the 'Object - Move object' interaction you're using needs the object to be on a walkable area, which it probably isn't if it's a painting on a wall. So, you can either:
  1. Make a small walkable area on the wall for the painting to move in, or
  2. Use a 'Run Script' interaction, and the MoveObjectDirect command.

Hopefully one of these will sort it for you.
SMF spam blocked by CleanTalk