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

Topics - Jojowl80

#1
I have 2 characters in the same room, with a fence that seperates them. I have made paths that change room on both sides. I used eBlock, but both characters can still exit both spots. How do I make it so each character with an accesible walking area can only leave from that spot?
#2
trying to make a combination lock without using integers. I am terrible at math.
this is what I have formulated so far. I have no idea if this will even work.
Code: ags

function room_RepExec()
{
if ((((but1 == true && (but2 == true) && (but3 == true) && (but4 == true)))))
lev1 = true;
}


function hbut1_AnyClick()
{
sClick.Play();{
but1 = true;
but2 = false;
but3 = false;
but4 = false;
  
}
if (((but2 == true) && (but4 == true) && (but3 == true))){
sClick.Play();
but1 = true;
cJojo.Say("Coordinates ready");
}}

function hbut2_AnyClick()
{
sClick.Play();
but2 = true;
but1 = false;
but3 = false;
but4 = false;
}

function hbut3_AnyClick()
{
sClick.Play();{
but3 = true;
but1 = false;
but2 = false;
but4 = false;
}
if ((but2 == true) && (but4 == true)){
sClick.Play();
but3 = true;
}}

function hbut4_AnyClick()
{

sClick.Play();{
but4 = true;
but1 = false;
but2 = false;
but3 = false;
}
if (but2 == true){
sClick.Play();
but4 = true;
}}

function hlev1_AnyClick()
{
if (Verbs.UsedAction(eGA_Push)) {
cJojo.Say("I need coordinates first.");
}
if (lev1 == true){
cJojo.Say("Engage!");
sRocket.Play();

}

else if(Verbs.UsedAction(eGA_Pull)) {
   cJojo.Say("I'm already Disengaged.");
}
else if(Verbs.UsedAction(eGA_Open)) {
    cJojo.Say("What would that do?");
    
}
else if(Verbs.UsedAction(eGA_Close)) {
    cJojo.Say("What would that do?");
}
}

#3
I have an area with a bunch of ladders and platforms and a walkable area that is 2 by 2 that connects them all. However my character seems to always get caught in certain spots, and no matter how big I make the walkable area he still freezes. I don't understand what he is catching on. Like I said though I tried expanding the areas to 5 x 5 so he would have less of a chance to get stuck, but he still does. anything I can do?
#4
hey I have searched relentlessy on how to change a character using verbs, to no avail. I have 3 characters in the game and I would like to be able to switch through them in order, by using one button. I made a button for the GUI already I just don't know how to connect it to the main script.  thanks!
#5
Code: ags



function hTopDrawer_AnyClick()
{
  if (Verbs.UsedAction(eGA_WalkTo)) {
 
}else if(Verbs.UsedAction(eGA_Pull)) {
   player.Say("Try Opening it.");
   
     
}else if(Verbs.UsedAction(eGA_Push)) {
    player.Say("I don't need to Push that");

}else if(Verbs.UsedAction(eGA_Open)) {

    player.Say("Okay.");
    sDrawer.Play();
    player.Say("There was a Fork in the Drawer.");
    player.AddInventory(iFork);
    Fork1 = true;
    
}if (Fork1 == true){
    player.Say("Nothing Else.");
    
}else if(Verbs.UsedAction(eGA_Close)) {
    player.Say("Already closed.");
}
}



If I open the drawer again it just gives me the item again. However if I right click it says "nothing else"
#6
I am trying to make my invisible player walk across a room to  to make it look like a cutscene. The room is 400 in length, so I want it topan to the other half of the room.

Code: ags


function room_Load()
{
aFog.Stop();
sAirplane.Play();
 player.Transparency = 100;
  gMain.Visible = false;

}


function room_AfterFadeIn()
{
Wait(200);
aOrcus.Play();
player.Move(35, 188, eBlock);
}



He starts on the right side of the room, but he doesn't move an inch from the spot he enters on.
#7
my game closes with this error message  :ObjectOn: Invalid Object specified
in reference to object 3

Code: ags


function hHotspot1_UseInv()
{
if (player.ActiveInventory == (iLasso))
player.Say("Okay.");
object[1].Visible = true;
sLever.Play();
object[2].Visible = true;
object[3].Visible = true;
sLadder.Play();
object[0].Visible = true;
RestoreWalkableArea(6);

}



I have all 4 objects set to false before the character throws a switch. So why 3 of them work and the other one does not.. I have no idea
#8
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
#9
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?
#10
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!
#11
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?
#12
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.
#13
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.
#14
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
#15
I have a sequence where the character turns off a light switch.


Code: ags

} else if (Verbs.UsedAction(eGA_Push)) {
    player.Say("Okay.");
    player.ChangeRoom(2);
    player.Transparency = 100;
    player.Say("Oooohhhh Deeaar...");
    player.Say("I think I broke the game");
    player.Say("Jojo??");
}


but what happens is that it displays the after speech *before* the room goes dark.
is dialogue just always set to go first?
#16
as said I would like to turn on and off objects


Code: ags
 
function hComputerbutton_AnyClick()
{
  if (Verbs.UsedAction(eGA_WalkTo)) {
 
  } else if (Verbs.UsedAction(eGA_Push)) {
} 
if (MyCounter == 0) {
    
    player.Say("Okay.");
     player.Walk(214, 159, eBlock);
    object[0].Visible = true;
    MyCounter +=1;


}
if (MyCounter == 1) { 
   
    player.Say("Okay.");
     player.Walk(214, 159, eBlock);
    object[0].Visible = false;
    MyCounter -=1;
}



but instead of having separate instances, It does it all in the same loop. essentially i'm hoping using the minus counter will reset back to 0 enabling the character to keep turning off and on continuously
#17
I made a closet door that opens and when it opens I added an object to show the door open with new objects behind it. Now I dont see a way to interface with the new items. is this even possible?
#18
hey! So I have two Identical lines of coding, one works(the television) the other does not. ID numbers are correct.

//Code
function hComputerscreen_AnyClick() {
  if(Verbs.UsedAction(eGA_WalkTo)) {

}
  else if(Verbs.UsedAction(eGA_Push)) {
    player.Say("Okay.");
{ object[1].Visible=true;
   
}
}}

function hTelevision_AnyClick() {
  if(Verbs.UsedAction(eGA_WalkTo)) {

}
  else if(Verbs.UsedAction(eGA_Push)) {
    player.Say("Okay.");
{ object[0].Visible=true;

}
}}

Not seeing the error. thanks!
#19
hey! I would like to turn a TV on when "pushed" to put an object in place. the object is set at false the object ID is 0

//script

function hTelevision_AnyClick() {
  if(Verbs.UsedAction(eGA_WalkTo)) {

}
  else if(Verbs.UsedAction(eGA_Push)) {
    player.Say("Okay.");
  Object[0].Visible=true
}
}

error: fixed size array cannot be used in this way

Im very new to scripting any help would be appreciated!
SMF spam blocked by CleanTalk