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

#1
Hi, so I'm not sure what section this goes in, but what art program should I use for backgrounds? I tried to follow the background tutorial on the main ags site, but artgem isn't available anymore.
#2
The Rumpus Room / Re: News Of Teh Worlds!
Tue 18/02/2014 02:38:16
It's not a picture, I'm too lazy to take screenshots atm but:

New Zealand Prime Minister John Key: I Am Not A Shapeshifting Space Reptile
#3
Yay! It worked :D Thanks so much Khris!
#4
Oh yah, for that I took your Otherclick advice, except named it anyclick. Tha ks so much! I'll test this out in a few seconds.
#6
(By the way it is very much a wip me experimenting with stuff. The art is awful XD)
#7
Alright, I'm uploading the source zip files: Here you go:

https://www.mediafire.com/?968ql88k2l683nc
#8
Alright, I'm going to try grabbing the unedited files and replacing the edited ones.
#9
I edited some lines in the GlobalScript.asc and the guiscript.asc so I think that it is a problem with one of those. I am putting the information on pastebin, too many characters to put on here:

GlobalScript.asc: http://pastebin.com/mHuEezB7

guiscript.asc: http://pastebin.com/AyGRgiMT

(I'm fairly certain it is a problem with the GlobalScript)
#10
I'm not getting any actions while doing anything to the pants. Also the right click doesn't work.
#11
Okay so I did the display thing, and yes, it showed up, but not the part where it says "It's my pants." So I think the problem is with:

Code: ags
  if (UsedAction(eGA_LookAt)) {
#12
Quote from: Khris on Thu 02/01/2014 01:28:29
So the function gets called. Are you actually looking at the items? As opposed to pushing or opening them?

And what do you mean by "nothing I put there"? Where? In Unhandled()?

I meant to say nothing I put there. And yes, I am looking and doing use with.
#13
Quote from: Khris on Wed 01/01/2014 16:23:41
Weird, works fine for me.

One thing you could do (and should, anyway) is to add
Code: ags
  else Unhandled();

at the end, in order to avoid the game doing nothing upon certain actions.

You can also put a Display("Function is called."); at the start of the function to try and isolate the problem.

I have tried
Code: ags
  else Unhandled();

and I have used it for all of the physical things in the room. Oh one thing I forgot to mention, when using
Code: ags
  else Unhandled();

it showed the text from Unhandled, but nothing I put there.
#14
Quote from: Khris on Wed 01/01/2014 04:47:18
Did you copy-paste those functions into the script?
Because you need to link them to the event.

AGS isn't going to even look for those functions unless they are entered in the events pane.

Yup, I did. In the events pane it says i(item)_AnyClick for each event.
#15
In the MI-9 style, nothing activates when I do something with an item. This is the script for the items:

Code: ags
function iBook_AnyClick()
{
  if (UsedAction(eGA_LookAt)) {
    dBook.Start();
  }
}

function iSheet_AnyClick()
{
  if (UsedAction(eGA_LookAt)) {
    cRachel.Say("It's my bedsheet.");
  }
  if (UsedAction(eGA_UseInv)) {
    if (cRachel.ActiveInventory == iPants) {
      cRachel.AddInventory(iSPTT);
      cRachel.LoseInventory(iSheet);
      cRachel.LoseInventory(iPants);
      cRachel.Say("I tied my pants and sheet together. It looks like a rope now.");
    }
  }  
}

function iPants_AnyClick()
{
  if (UsedAction(eGA_LookAt)) {
    cRachel.Say("It's my pants.");
  }
  if (UsedAction(eGA_UseInv)) {
    if (cRachel.ActiveInventory == iSheet) {
      cRachel.AddInventory(iSPTT);
      cRachel.LoseInventory(iSheet);
      cRachel.LoseInventory(iPants);
      cRachel.Say("I tied my pants and sheet together. It looks like a rope now.");
    }
  }  
}


And Khris, I did what you said in the last post. It worked temporarily but for some reason now it doesn't want to work...
#16
General Discussion / Re: The Hobbit II
Tue 31/12/2013 15:48:10
Quote from: Atelier on Tue 24/12/2013 17:44:11
The Hobbit was way too unrealistic for me. Yeah I know "but it's a fantasy!" yet even fantasies shouldn't exceed the framework of the world it's set in. Eg everything in Lord of the Rings or GoT is believable if you accept the basic rules of the fantasy world. But I'm pretty sure the hobbit and dwarves wouldn't survive a 10 million foot drop inside the goblin kingdom, and that chase scene was way too action movie-ey, and there was a genuine WTF moment when I saw that messenger on the string that the goblin with the deformed ball sack on his head speaks to. I also hated the whole White Orc subplot, not withstanding the CGI for it just looked so out of place for some reason. And in the trailer for Desolation of Smaug I saw Thorin jump about 10 feet into the air off a cliff, that would never happen.

I was hoping to see something in the same vein as the LotR but it turned out to be a dumb children's movie (the scene where that hedgehog called Sebastian dies actually made me angry). At least PJ stayed faithful to the text as it's essentially a children's book anyway. As a massive LotR fan I still hated it though.

No, they ruined it. It was completely different in the book, he didn't stay faithful to the text WHATSOEVER. He strayed from the plot too much, he also added way too much. The scene with Sebastian in it was not in the book at all. He added action where it wasn't nessisary, and it kind of ruined the point of the book. He added way too much extra plotline. The "Necromancer"
Spoiler
Who we all know is Sauron
[close]
was never  in it.
#17
Quote from: Khris on Mon 30/12/2013 23:24:14
You can use standard script commands in dialogs by indenting them by at least one space.
Just use
Code: ags
 aSound.Play();


Oh okay, thanks! You seem to like to reply to all of my questions :-D
#18
Quote from: Khris on Mon 30/12/2013 23:31:12
Here's the thing: the way the 9-verb GUI was written, when it comes to inventory items, it actually uses the look at event, not the other click event.
The simple solution, as explained in the PDF that comes with the template:
QuoteFor inventory items, it's a little bit different, because there is no any_click event in the room editor. So you first start
with "other click on inventory item", which creates the function iCup_OtherClick (in case you have an item, called
iCup).
Now copy this function name and paste it at other events, like Interact, look, talk and so on. In the end, you only have
one function name in all five events. You can also take a look at the sample items.

Oh okay whoops! Thanks for helping, didn't realize it was so simple :P.
#19
Hello everyone, this is a rather simple question. Anyone know how to play a sound in a dialog?
#20
Okay, so this might be a more simple question, but it is about MI-9 so I figured it would be best to post it here. This contains multiple script which could have the problem, so bear with me. I have created a dialog called dBook ((You can find it below)) and when you have the item "Large Marine Life" (iBook), it should play dBook. However, it plays nothing. I have no idea what part of the script this is a fault of, so I will give the global script, the gui script, and the dialog (although I don't think it's the dialog's fault). Here you go:

Global script book part:
Code: ags
function iBook_OtherClick()
{
  if (UsedAction(eGA_LookAt)) {
    dBook.Start();
  }
  else Unhandled();
}


The gui script (Part where I may have gone wrong):
Code: ags
function on_mouse_click(MouseButton button) {
  
  if (!is_gui_disabled()) {
    int mrx=mouse.x+GetViewportX();
    int mry=mouse.y+GetViewportY();
    int x=mouse.x;
    int y=mouse.y;
    // get location under mouse cursor
    GSloctype=GetLocationType(x, y);
    GSlocname=Game.GetLocationName(x, y);
    GSagsusedmode=Mouse.Mode;
    used_action=global_action;
    
    InventoryItem*ii = InventoryItem.GetAtScreenXY(x, y);
    if (GSloctype==eLocationHotspot) {
      Hotspot*h=Hotspot.GetAtScreenXY(x, y);
      GSlocid=h.ID;
      
    }
    else if (GSloctype==eLocationCharacter) {
      Character*c=Character.GetAtScreenXY(x, y);
      GSlocid=c.ID;
    }
    else if (GSloctype==eLocationObject) {
      Object*o=Object.GetAtScreenXY(x, y);
      GSlocid=o.ID;
    }
    else if (ii!=null) GSlocid=ii.ID;
    
    
    
    
    if (IsGamePaused()) {
      // Game is paused, so do nothing (ie. don't allow mouse click)
    }
    // Mousebutton Left
    else if (button==eMouseLeft) 
    {
        
      if (GlobalCondition(2) || GlobalCondition(3) || GlobalCondition(4)) {
        // Do nothing, if:
        // the mode is useinv and the mouse is over the active inv (like "use knife on knife")
        // or the mode is talk, or "Give", and the mouse isnt over a character
        // or its GIVE and the mouse isnt over a inv.item

      }
      else if (ExtensionEx(1, GSlocname)=='e') {
        UpdateActionBar();
        ActionLine.TextColor=ActionLabelColorHighlighted;
        WalkOffScreen();
      }
      // walk to
      else if (GSagsusedmode==eModeUsermode2) {
        ActionLine.TextColor=ActionLabelColorHighlighted;
        if (IsInteractionAvailable(x, y, GSagsusedmode)) ProcessClick (x, y, GSagsusedmode);
        else ProcessClick(x, y, eModeWalkto);
      }   
      // talkto
      else if (GSagsusedmode==eModeTalkto && IsInteractionAvailable(x, y, GSagsusedmode) && GSloctype==eLocationCharacter) {
        ActionLine.TextColor=ActionLabelColorHighlighted;
        if (GoToCharacter(character[GSlocid], eDir_None, NPC_facing_player, 1)) character[GSlocid].RunInteraction(GSagsusedmode);
        SetAction(eMA_Default);
      }
      // Giveto
      else if ((GSagsusedmode == eModeUseinv) && GSloctype==eLocationCharacter && isAction(eGA_GiveTo)) {
        ActionLine.TextColor=ActionLabelColorHighlighted;
        ItemGiven=player.ActiveInventory;
        
        if (GoToCharacter(character[GSlocid], eDir_None, NPC_facing_player, 2)) {
          if (IsInteractionAvailable (mrx - GetViewportX (), mry - GetViewportY (), eModeUseinv) == 1) {
            character[GSlocid].RunInteraction(eModeUseinv);        
          }
        }
        SetAction (eMA_Default);
      }     
      else {
        UpdateActionBar();
        ActionLine.TextColor=ActionLabelColorHighlighted;
        ProcessClick(x, y, GSagsusedmode);
        SetAction(eMA_Default);
        ItemGiven=null;
      }
    }
    // Mousebutton Right
    else if (button==eMouseRight) {
      if (alternative_action==eMA_Default) {
        SetAction(eMA_Default);
        ActionLine.TextColor=ActionLabelColorHighlighted;
        if (Mouse.Mode==eModeUsermode2) {
          if (ExtensionEx(1, GSlocname)=='e') {
            UpdateActionBar();
            ActionLine.TextColor=ActionLabelColorHighlighted;
            WalkOffScreen();
          }          
          else ProcessClick(x, y, eModeWalkto);
        }
        else ProcessClick(x, y, Mouse.Mode);
      }
      else
      {
        SetAction(alternative_action);
        used_action=global_action;
        UpdateActionBar();
        ActionLine.TextColor=ActionLabelColorHighlighted;
        GSagsusedmode=Mouse.Mode;
        if (GSagsusedmode==eModeTalkto && IsInteractionAvailable(x, y, GSagsusedmode) && GSloctype==eLocationCharacter) { //(GetCharacterAt (mouse.x, mouse.y) < 7))
          if (GoToCharacter(character[GSlocid], eDir_None, NPC_facing_player,2 )) character[GSlocid].RunInteraction(GSagsusedmode);
        }
        else ProcessClick(x, y, GSagsusedmode);
        SetAction(eMA_Default);
      }
    }
    //left click in inventory
    else if (button==eMouseLeftInv) {
      if (!isAction(eGA_GiveTo))ItemGiven= null;
   
      if (GlobalCondition (1)) {
        // if the mouse is in the inventory and modes Walk or pickup are selected
        SetAction (eGA_Use);
        location=GSinvloc;    
        if (Extension()=='u' && ii.IsInteractionAvailable(eModeInteract)) {
          // use it immediately (not with anything else)
          used_action=global_action;
          ii.RunInteraction(eModeInteract);
          SetAction(eMA_Default);
        }
        else {
          if (oldschool_inv_clicks) {
            SetAction (eGA_LookAt);
            used_action=global_action;
            ii.RunInteraction(eModeLookat);   
            SetAction(eMA_Default);
          }
          else player.ActiveInventory=ii;
        }
      } 
      else  if (GlobalCondition (2) == 1) {
        // if the mode is useinv and the mouse is over the active inv (like "use knife on knife")
        // so do nothing again
      }
      else {
        used_action=global_action;
        if (Mouse.Mode==eModeInteract) {
          if (isAction(eGA_Use) && ii.IsInteractionAvailable(eModeInteract)) {
            ActionLine.TextColor=ActionLabelColorHighlighted;
            ii.RunInteraction(eModeInteract);
            SetAction(eMA_Default);
          }
          else player.ActiveInventory=ii;
        }
        else {
          if ( (Mouse.Mode >0 && Mouse.Mode <10 )&& ii != null) {
                GSagsusedmode=Mouse.Mode;
                ActionLine.TextColor=ActionLabelColorHighlighted;
                ii.RunInteraction(Mouse.Mode);
                SetAction(eMA_Default);
          }
        }
      }
    }
    //right click in inventory
    else if (button==eMouseRightInv) {
      if (alternative_action==eMA_Default) {
        SetAction(eMA_Default);
      }
      else {
        SetAction(alternative_action);
        used_action=global_action;
        GSagsusedmode=Mouse.Mode;
        if (Mouse.Mode==eModeInteract) {
          if (isAction(eGA_Use) && ii.IsInteractionAvailable(eModeInteract)) {
            UpdateActionBar();
            ActionLine.TextColor=ActionLabelColorHighlighted;
            ii.RunInteraction(eModeInteract);
            SetAction(eMA_Default);
          }
          else player.ActiveInventory=ii;
        }
        else {
          UpdateActionBar();
          ActionLine.TextColor=ActionLabelColorHighlighted;
          SetAction(eMA_Default);
        }
      }
    }
  }
}

function repeatedly_execute_always() {
  // Doubleclick Timer
  if (!IsGamePaused() && !is_gui_disabled()) {
    if (timer_run == true)
    {
      timer_click++;
      if (timer_click >= dc_speed){
        timer_click = 0;
        timer_run = false;
      }
    }
  }
}


The dialog (Yes, it's strange):

// Dialog script file
@S 
Rachel: It's a book on Large Marine Life.// Dialog startup entry point
return
@1
Book: Whales are the largest mammals that inhabit the Earth, however, all of them are vastly different. The whale meat industry is large in Asia and brings them to the brink of extinction.
Rachel: That's what I do. Prevent them from becoming extinct by gathering data.
goto-dialog 1
@2
Book: Sharks are misunderstood carnivores which are at the top of the food chain in the ocean. However, poaching threatens to drive them to death.
Rachel: I don't much like sharks. Whales are more my thing.
goto-dialog 2
@3
Rachel: There doesn't appear to be anything else worth reading here.
stop
SMF spam blocked by CleanTalk