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

#1
Ok all.  here's the situation.  I am creating a game in which a guy is burning from the inside.  I have it set to timer 1 with setTimer(1,40)

in GlobalScript.asc
---------------------------------------------------
function repeatedly_execute()
{
   if (IsTimerExpired(1)==1)
    {
      heatUp();
      SetTimer(1, 100);
    }
}

That function works fine.   I have a water bottle that currently lowers the character's heat value by a defined value.  That also works.  I am now trying to pause the heatUp() function for 60 seconds after using the water bottle, then continue.   I have tried to create my own timer to decrament in a while loop for the pause, but it doesn't seem to work.


function iWaterBtl_Interact()
{
   coolOff();                                                              // cools off player and designated amount
   waterToken -= 1;                                                 // decrements waterToken by 1, starting at 4 (declared in global variables)
   if (waterToken ==0)                                             // if waterToken reaches 0, remove iWaterBtl from inventory
   {
      cChristian.LoseInventory(iWaterBtl);
   }
   mouse.Mode=eModeInteract;
     while (waterTimer >= 0)                                    // water timer declared in global variables as int 60
     {                                                                        // while waterTimer is greater than 0
     heatIndex = heatIndex;                                    // set heatIndex to itself (aka.. pause heatIndex)
     waterTimer -= 1;                                                // decrement waterTimer by 1
     }
}
#2
Advanced Technical Forum / Timer help
Thu 06/10/2011 18:44:29
Ok all.  here's the situation.  I am creating a game in which a guy is burning from the inside.  I have it set to timer 1 with setTimer(1,40)

in GlobalScript.asc
---------------------------------------------------
function repeatedly_execute()
{
   if (IsTimerExpired(1)==1)
    {
      heatUp();
      SetTimer(1, 100);
    }
}

That function works fine.   I have a water bottle that currently lowers the character's heat value by a defined value.  That also works.  I am now trying to pause the heatUp() function for 60 seconds after using the water bottle, then continue.   I have tried to create my own timer to decrament in a while loop for the pause, but it doesn't seem to work.


function iWaterBtl_Interact()
{
   coolOff();                                                              // cools off player and designated amount
   waterToken -= 1;                                                 // decrements waterToken by 1, starting at 4 (declared in global variables)
   if (waterToken ==0)                                             // if waterToken reaches 0, remove iWaterBtl from inventory
   {
      cChristian.LoseInventory(iWaterBtl);
   }
   mouse.Mode=eModeInteract;
     while (waterTimer >= 0)                                    // water timer declared in global variables as int 60
     {                                                                        // while waterTimer is greater than 0
     heatIndex = heatIndex;                                    // set heatIndex to itself (aka.. pause heatIndex)
     waterTimer -= 1;                                                // decrement waterTimer by 1
     }
}
#3
Hey all.  I'm trying to get a conditional dialogue option to be a different color than the standard choices.  Is this possible?  I don't want to change the color of what he actually says in-game, just the text line in the options.  Please help!
#4
My team is trying to create a graphical overlay that will start off at a percentage of transparency and then get more solid (less transparent) as your heat level increases.  I used the code in the Dynamic help as a starting point.   The problem I'm having is I'm unsure where to place the code.  I either get the overlay to show up and infinitely run, or it shows up one time and so fast that you don't ever see it.  I want this to happen on any level throughout the game.  I've tried to place it in the   function repeatedly_execute()   and the   function repeatedly_execute_always() .   Please help.  Also, if you know how to set the transparency of the overlays, that would be excellent info.


function OL()
{
if (heatIndex >= 3)
  {
    Overlay* Boom = Overlay.CreateGraphical(100, 100, 71, true);
    Wait(40);
    Boom.Remove();
  }
}
#5
How do I play a .wmv file in my AGS game?   I have made an intro video to my game and can't figure out where to place it or add it, so that I can call the PlayVideo(); function.   Someone please help!!  Trying to figure it our for our class.
#6
I'm trying to  (A) make objects in my game solid.  and (B) Create a function that can set multiple objects to solid.

For Example:

Table.Solid = true;   (This is what wiki said but didn't work)

Function makeSolid(object)
{
    object.solid = true;
}

so I can just call:

   makeSolid(Table);  (This will call the table.solid = true; function)

Please help ASAP. 
SMF spam blocked by CleanTalk