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 - Swamp Witch

#1
Thank you Elliott.Ã,  I have already looked at these posts.Ã,  It is the third post that is doing what I am looking for.Ã,  The problem is that there is a link for the dropping part of the object and the link no longer works.Ã,  I've tried numerous things from all these posts, but I can't get it to work.
#2
Woohoo! That did the trick.Ã,  If you can help with one more thing, I can get this puzzle working.Ã,  This script is for a click and drag puzzle.Ã,  When clicking on an object, the cursor will carry it.Ã,  When it hits the correct hotspot, I then want the mouse to release the object.Ã,  This is where I am having trouble.Ã,  I can't get it to release the object and it pulls it away from the hotspot when I click somewhere else.

// room script file

int button_pressed=0, ob=-1;

#sectionstart room_aÃ,  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
Ã,  // script for Room: Repeatedly execute
if (IsButtonDown(LEFT)) {
Ã,  Ã,  if (button_pressed==0) {
Ã,  Ã,  Ã,  button_pressed = 1;
Ã,  Ã,  Ã,  ob = GetObjectAt(mouse.x, mouse.y);
Ã,  Ã,  }
Ã,  } else {
Ã,  Ã,  button_pressed=0;
Ã,  Ã,  if (ob!=-1) {
Ã,  Ã,  Ã,  SetObjectBaseline(ob, 0);Ã,  Ã,  Ã, 
Ã,  Ã,  Ã,  ob=-1;
Ã,  Ã,  }
Ã,  }
Ã,  Ã, 

Ã,  if (ob != -1) {
Ã,  Ã,  int widthÃ,  = GetGameParameter(GP_SPRITEWIDTH, GetObjectGraphic(ob), 0, 0);
Ã,  Ã,  int height = GetGameParameter(GP_SPRITEHEIGHT, GetObjectGraphic(ob), 0, 0);
Ã,  Ã,  SetObjectBaseline(ob, game.room_height);
Ã,  Ã,  SetObjectPosition(ob, mouse.x-width/2, mouse.y+height/2);
}

if (Hotspot.GetAtScreenXY (oBlackball.X - GetViewportX(), oBlackball.Y - GetViewportY()) == hhotspot1) { // if MyObject is on MyHotspot
Ã,  Display ("This is a test");
}
#3
Is there a way to script if an object is on a hotspot?
#4
Yes that worked.  Thank you!!!!!
#5
In my global script, I am using this:

function repeatedly_execute() {
Ã,  // put anything you want to happen every game cycle here
Ã,  if (GetLocationType(mouse.x,mouse.y) > 0) {
Ã,  Ã,  Ã, mouse.UseModeGraphic(eModePointer); }
Ã,  else {
Ã,  Ã,  Ã, Mouse.UseDefaultGraphic(); }

so that whenever the mouse rolls over a hotspot it will turn to the pointer.Ã,  The problem is, whenever the cursor is holding an inventory item and rolling over the hotspot, the inventory item disappears and the cursor turns into the pointer.Ã,  Moving away from the hotspot will display the inventory item again.Ã,  How can I code it so this will not happen?Ã,  This is a first person game and the only cursor modes I am using is "interact".
#6
That was it.Ã,  Thanks againÃ,  ;D
#7
I have a gui that pops up whenever a puzzle is completed successfully with a character image on a button and a label that displays their score.  The character image on the button looks grayed out.  Is there something I need to set to prevent this from happening?
#8
Ah, the eNoBlock, eAnywhere did it.  Thank you!!!!
#9
Thanks Scummbuddy, I'll take a look at these.

I am curious about this "move" statement though.  It won't work for me.  I unchecked "Enforce object-based scripting" in my general settings and scripted:
MoveObjectDirect (2,77,140,5); and the object moves

If I use:
object[2].Move(77,140,5); for 2.7, the object doesn't move.  I don't get it. 
#10
Move Object
I am trying to move an object and it won't move.  I have this:
object[1].Move(98, 77, 4); defined under the "run script" for the interaction.  This is a first person game using two characters.

Drag and Drop
Can someone tell me how to do this with 2.7 code.  I've tried several things and they are not working:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14984.0
#11
Is it possible to have a pop up box/gui that will display the inventory item that was just picked up?
#12
Thanks again.  Can you also tell me how to get an inventory item on a gui so that anytime an inventory item is picked up, a box will pop up with the inventory item in it?
#13
When working with a first person game and using two characters, how do I make the second character invisible?  Example, each room is set with the "Hide Player Character" checked.  If character one moves around the rooms, he/she is invisible.  When character one goes into a room where character two is, you can see the character 2.  How do I make character 2 invisible?
#14
Is there a way to disable the status bar and get the top of the room image back?
#15
That worked out real nice.  Thanks Strazer.
#16
Yes.Ã,  You will always have the "interact hand" until the mouse rolls over a hotspot, which will then turn into the pointer, signifying there is some activity at hand there.  It worked out well.

Different question ....Ã,  Can the statusbar be used for text?Ã,  If there are voice files for the other characters, can I use the statusbar to show the text the character is speaking?
#17
I got it to work like this:

if (GetLocationType(mouse.x,mouse.y) > 0) {
     mouse.UseModeGraphic(eModePointer); }
  else {
     Mouse.UseDefaultGraphic();
}
#18
QuoteIt looks though like you may just be trying to automatically set the cursor to eModeInteract when you move the mouse over a hotspot, and then restore it when it's not?

Yes, this is what I am trying to do.Ã,  It is a first person game.
#19
I am trying to make the cursor turn to the hand graphic when I run over a hotspot.Ã,  After changing the script, I can't pick up anything from my inventory. In the game start function, I am using this:

mouse.UseModeGraphic(eModePointer);

So that I will have the pointer until I come to a hotspot,

In the repeatedly execute function, I have this:

function repeatedly_execute() {
Ã,  // put anything you want to happen every game cycle here
Ã,  if (GetLocationType(mouse.x,mouse.y) > 0) {
Ã,  Ã,  Ã, mouse.Mode = eModeInteract; }
Ã,  else {
Ã,  Ã,  Ã, mouse.Mode = eModeInteract;
Ã,  Ã,  Ã, mouse.UseModeGraphic(eModePointer); }
}

What did I do wrong?
#20
This is great!  Thank you.
SMF spam blocked by CleanTalk