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

#21
Code: ags


function room_LeaveLeft()
{
  if (stove == true){
  
  player.Say("Lets not burn the house down, in the first 5 minutes of the game.");
  
  } 
 if (stove == false) {
  player.ChangeRoom(12, 250, 350);
  
 }
} 


I made the bool already, the rest of it I honestly do not understand.
#22
I should have mentioned I have for different burners on the stove. each with similiar coding. Object 0,1,2,3



Code: ags


function hDial1_AnyClick()
{
if (Verbs.UsedAction(eGA_WalkTo)) {
 
  } else if (Verbs.UsedAction(eGA_Use)) {
   player.Say("okay.");
   object[0].Visible = !object[0].Visible;
   stove = object[0].Visible;
 }
}



I have it set when the charater leaves the room, he warns the player that the house will burn down if he leaves the burners on. So now when I try to leave it shows that dialogue over and over again.
#23
Code: ags
[code/ags]

player.Say("okay.");
   object[2].Visible = !object[2].Visible;
   stove = true;



So as of now the stove turns off and on but obviously, once this happens once the bool stays on forevor. anyone to set it to false in conjecture with !object
#24
I ended up just making a GUI. thanks everyone!
#25
I guess I can make a GUI if I have to, but is there anyway to call it when I use the "usermode" function?
#26
I have this in my Global script, its an item the player can click on, and the idea is I want a bunch of stickers to show up as they collect them throughout the game.

Code: ags


function iStickersheet_Interact()
{
if (sticker_1 == true) {
object[0].Visible = true;  
player.Transparency = 100;
gMain.Visible = false;
gAction.Visible = false;
player.ChangeRoom(33);
 }  
 
  else {
player.Transparency = 100;
gMain.Visible = false;
gAction.Visible = false;
player.ChangeRoom(33);

 }
}


I made a Bool for sticker_1 and I also set the bool to true when the item was collected.
however it does not seem it is calling the object at all. Maybe it is calling it to a different place?
#27
awesome thanks! had no idea these manuals existed thank you for showing them to me
#28
Is there any command to change the room to the previous one? I have a map, I want to be able to click on an arrow and it goes back to the room the character was in.
Obviously the player will use this map in multiple rooms so I cant have the character always returning to the same room every time. thanks!
#29
thanks! everytime I try to put else statements I always get parser error's so I have been trying to avoid them.
#30
Code: ags



function hHotspot1_AnyClick()
{
  if (Lamp == true)
player.Walk(63, 38,  eBlock);
player.ChangeRoom(27, 140, 55); {
     {
  if (Lamp == false)
player.Walk(63, 38, eBlock);
player.ChangeRoom(21, 140, 55); {
    }
   }
  }
 }
   


but its saying I can't do the second location cause I already have the first location. any way around this?
#31
Ohhhh I see it now! don't know why that was so hard to understand, thanks for all the help everyone!
#32
thanks everything is working. I still do not fully understand indenting tho. Is there a good article to read about it?
#33
hmmm. I closed the first if block off, but it didn't seem to change anything. he still doesn't use the item.

Code: ags


function Arcus_UseInv()
{
  if (player.ActiveInventory == iCcupfull) {
    if (player.HasInventory(iCcupfull)) {
      player.Say("I thought you'd never ask.");
     player.LoseInventory(iCcupfull);
    player.AddInventory(iCcup);
    }
  if(player.ActiveInventory == iMrow) {
     if (player.HasInventory(iMrow)) {
      player.Say("The Mrownomitor is picking up some locations on the map!");
      Mrow = true;
     } 
}}}

#34
so heres what I have in the global script

Code: ags


function Arcus_UseInv()
{
  if (player.ActiveInventory == iCcupfull) {
    if (player.HasInventory(iCcupfull)) {
      player.Say("I thought you'd never ask.");
       player.LoseInventory(iCcupfull);
      player.AddInventory(iCcup);
   
   
    if(player.ActiveInventory == iMrow) {
     if (player.HasInventory(iMrow)) {
      player.Say("The Mrownomitor is picking up some locations on the map!");
      Mrow = true;
    
  }
}}}}



Not sure how to set up use of different items. can only ever seem to get one working at a time.
#35
okay not sure if I am on the right track or not
I set the Bool "Mrow" in the global Variables to false.

I have this on my Map

Code: ags

function room_Load()
{
if (Mrow = true);
object[0].Visible = true;
}


I'm not sure where to put the function to use the item, I imagine it would have to go in Global.Asc? but how would I call it there?
#36
I was wondering if it was possible If I were to use an item in any room in my game, to make objects appear on my map screen. essentially I want locations to not appear on the map until the condition is met.
#37
perfect! thank you
#38
I posted this in my Global Script

Code: ags

function Arcus_UseInv()
{
 if (player.ActiveInventory == iCcupfull)
 if (player.HasInventory(iCcupfull))
 player.Say("I thought you'd never ask.");
 player.LoseInventory(iCcupfull);
 player.AddInventory(iCcup);
}


but it does not matter which inventory item I use on him, it activates the script.
#40
Hey so I have two Items I want the player to have before he can make coffee

Code: ags


function hCoffeMaker_UseInv()
{
  if(player.HasInventory(iCoffee) && player.HasInventory(iCcup))
  player.Say("Giddyup!");
  sBrew.Play();
  Wait(150);
  player.Say("Oh boy, Coffee's ready!");
  sPour.Play();
  Wait(150);
  player.LoseInventory (iCcup);
  player.AddInventory(iCcupfull);
}  


problem is if I use either item singularly it also makes the coffee. Want to make it so he has to have both items before he makes it
SMF spam blocked by CleanTalk