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

#3041
QuoteGlobalScript.asc(541): Error (line 541): PE04: parse error at ';'
For starters if statements do not end with a ; .....this is the error

#3042
When the player picks up the stick of dynamite the player's view changes to that of his dynamite view.

If you then click on the rock with the player in dynamite view the player will move to the rock he has clicked on then change view back to normal as the rock explodes...

A very basic way:
Code: ags

//After clicking on dynamite object 
player.Walk(x,y,eBlock, eWalkableAreas); // Walk to Dynamite x y
odynamite.Visible=false; //Dynamite disappears
player.ChangeView(View number); // Dynamite view

// Player clicks on rock. You will need an 'if' condition that player is in dynamite view for events to happen.
player.Walk(x,y,eBlock, eWalkableAreas); // Walk to position x y in Dynamite View
player.ChangeView(View number); // Back to Normal view
Wait(6); // To give a very slight delay
// Dynamite detonates


I use various methods for doing this and it can be much added to: Like extra player animations.



#3043
if you mean clicking on the player whose view is of holding dynamite (assuming it's got that view) then yes it can be done that way. You could detonate the rock with the dynamite in a number of ways: like using a hotspot / object etc.

It depends how you want the events to happen.

In short: Yes, it can be done...




#3044
Hi,

(hope Joe see)

Adding missions is not a problem.  However, now I am modifying them it seems that add missions are being deleted when in another room

EG
Room 5
addmission
Room 6
addmission

Room 7
addmission
modifymission (this deletes an old add mission and still keeps modified and its add mission..

Could this be connected with the Refresh function?

SCRIPT:
Code: ags
//Your script asc
#define MAX_MISSIONS 100
String missions[MAX_MISSIONS];
int mission_count=0;
function AddMission(String mission_text)
{
  missions[mission_count]=mission_text;
  mission_count++;
  return mission_count-1;//return the mission ID
}
function ModifyMission(int missionID, String new_text)
{
  missions[missionID]=new_text;
}
function RefreshLabel()
{
  LMemory.Text="";
  int i=0;
  while(i<mission_count)
  {
    LMemory.Text=String.Format("%s %s [",LMemory.Text,missions[i]); //Maybe AGS has an append method, I can't remember
    i++;
  }
}
 


Code: ags
//Your script ash
 
import function AddMission(String mission_text);
import function ModifyMission(int missionID, String new_text);
import function RefreshLabel();
 


Code: ags
//At global position

//examples:

int lubricant_mission,food_mission;
 
//When you want to add 1 mission or more
lubricant_mission=AddMission("Find lubricant.");
food_mission=AddMission("Find food");
RefreshLabel();
 
//Whenever you want to modify the text for mission completed:
ModifyMission(lubricant_mission,"Have found lubricant");
RefreshLabel();
 



Actual Ints:
Code: ags

int  nursery_mission, radio_mission, clover_mission, head_mission, barn_mission,  spike_mission, wardrobe_mission, pit_mission, train_mission, carpet_mission, ladder_mission, madonna_mission, lubricant_mission, food_mission, word_mission, wheel_mission, battery_mission, glue_mission, elements_mission, switch_mission, questions_mission, block_mission, wooddoor_mission, combust_mission, direction_mission, cup_mission,balloons_mission,candle_mission,word2_mission;




Hope this can be sorted.

Cheers


#3045
Hi,

Update for Deadly Consequences

New: 'Live Status Report' Check how you are doing at anytime.

Summon Rebecca (a girl ghost) with a musical box.

More Rooms and puzzles added..

Game progress: 75%



#3046
General Discussion / Time counter name
Sat 19/07/2014 09:34:11
Hi,


Time Counter number plus Lost Time Counter number = __?___ New Counter time.

example:
Time left (1300) + Lost Time (500) =? Time.

What would you call the new time counter?

cheers

#3047
Hi Khris,

about 2 minutes as I had only just began implementing it... It suddenly dawned on me what I needed to do...

#3048
Hi,

I am creating a game status report and have hit a snag.

I need to stop a function....

This is the function:

Code: ags

int walktimer;

function Walking() 
{
    if(player.Moving)
      {
          walktimer=0;
      }  
    else if (walktimer > GetGameSpeed ())
      {
          Stopped_Moving += 1;
          LNotMoving.Text = String.Format("%d", Stopped_Moving);
          walktimer = 0;
      }
    else walktimer++;
}



In Rep exec always:

Code: ags

  LDoors.Text = String.Format("%d", Doors);
  Larrows.Text = String.Format("%d", Arrows);
  LNotMoving.Text = String.Format("%d",Stopped_Moving);
  LSecrets.Text = String.Format("%d",Secret_Area);
  LRemain.Text = String.Format("%d",lapsed);
  LTime_Taken.Text = String.Format("%d",lapsed);
  LLostTime.Text = String.Format("%d",Stopped_Moving);
  LMeanTime.Text = String.Format("%d",lapsed-Stopped_Moving);
  Walking(); // This is the function I need to stop when viewing the status report... The gui is set to pause game.


Can you help..

cheers

EDIT Tut tut... added this:

Code: ags
if(gStatus.Visible==false)
  Walking();
  


All now ok (nod)



#3049
There IS a Region events (and functions and properties) topic section in the manual if you type Region Events in the manual search.

Apply Regions as you do with Hotspots.

Add events to them as how Khris said.
#3050
Hiya Sunny,

Looking good ;)

If only we could 'stretch' time...

I'm lucky (if I should say that) in the fact that I am able to spend 7 / 12 hours a day on a game, hence I can get things done quicker.

Nonetheless, keep up the good work mate (nod)

slasher
#3051
Thanks Scavenger,

I was sure there was a better way. Works a treat.

many thanks ;)
#3052
Hi,

There is an area that I am trying to incorporate in to a game and I need some assistance.

Basically a timer measures the time you are NOT moving. If you are not moving then the timer goes up 1 a second per second you are not moving (every time you are not moving).

When the player is moving then the timer stops  etc etc.

I made a variable 'Stopped_Moving' and a function:

Code: ags

// function top Global asc

function Walking()
{
  if(player.Moving)
  {
  SetTimer(3, 0);
  }  else 
  {
  Stopped_Moving=(Stopped_Moving +1);
  LNotMoving.Text = String.Format("%d", Stopped_Moving);
  SetTimer(3, 40);
  }  
}


I have imported it:
Code: ags

// import Global ash

import function Walking();


Code: ags

// Global asc

// in function repeatedly_execute_always()
}
 if (IsTimerExpired(3)) 
{
 Walking();
}


Would someone please give me  hand..

Thanks

#3053
Hi,

this is indeed a good question and it brings up a mathematical question regarding using continuous scaling true [n] [n] and relating to walkable area length.

Has anyone ever figured out the maths, if it is of course possible to work out?

Other than that it's a case of trying [n] till it looks right.

;)

#3054
New Scene (IP):

Can you overcome 'The Prisoner' like killer balloons and obtain the black raven?


Game progress: 56%

On schedule


#3055
Hi guys,

just to be clearer about it: There are numerous DisplayTops and each one will display its own message within the game so I just can't 'call the function.', can I?

Game.MinimumTextDisplayTimeMs would work but I would have to change it every time before and after (with / without a function for it).

I will look in to this more but meanwhile i'm using:  Display gui + label for [n] time and then click off gui to close.

cheers

EDIT: I was typing DisplayTopBar instead of DisplayTopB :~(

My apologies Khris ;)

Works (exactly as was said).



#3056
Hi Khris,

does not really perform as I would have liked. Mainly, I believe, because the string lengths are quite short and I can't seem you use - for time displayed. Hopefully it's on screen long enough for people to read it...

Be a devil if I need to whip up a gui and label instead. Display gui for x time then click off gui to close.... (roll)

Cheers
#3057
Update...

Desecration is finished, game wise.

Waiting to put the last of the voices into the game and finish off grammar checking.

Release date mid July.

Charles Davenport is coming..........................




#3058
Hi Adeel,

not really, for obvious reasons.

I will try other methods.

Cheers anyway.



#3059
Hi,

is there a way to amend Game.TextReadingSpeed when DisplayTopBar is shown? There does not seem to anything in autofill.

Game.TextReadingSpeed = 11 and will change to  Game.TextReadingSpeed = 8 when TopDisplay is shown and return when not shown.

cheers

#3060
New Screenie (still in progress):

'The Fallen Madonna' (the one with the big  ******* (laugh))


Lost 2 days but almost back on schedule.

Game progress: 40%


SMF spam blocked by CleanTalk