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

#81
Hi

I have a counter which when reaches 0 proceeds with events. I have it in rep exec ==0.

My problem is that if you have say it still counts down ie -1 -2 before events happen. I need it to stop once it reaches 0 and the events to follow. It runs ok if you are not saying anything etc. I even have  LScore.Visible=false; but you still see it.

This is what i have in rep exec:

Code: ags

if (game.score == 0){
	 
	 LScore.Visible=false;
	 object[12].SetView(19, 0, 0);
	 object[12].Animate(0, 3, eRepeat, eNoBlock);
	 cFrankj.FaceLocation(185,126);
	 aExplodes.Play();
	 aGameover.Play();
	 aGameover.Stop();
	 cFrankj.LockView(29);
	 object[5].Visible = true;
	 object[8].Visible = true;
	 object[37].Visible = true;
	 cbjorn.Say("Your time is up. Boom!!");
         cFrankj.Animate(0, 4, eOnce, eBlock);
	 Wait(20);
	 object[34].Visible = false;
         Display("You have been blown to pieces!");
	 SetFadeColor(200, 0, 0);
	 cFrankj.ChangeRoom(3);
	 
}


Help appreciated.

barefoot

#82
Who is the masked man?







#83
Hi NickyNyce

I am just creating a one room game where I have to work in a confined space.

Good experience and a learning curve for future games.

If you wanted to make it with more rooms then I expect it would be a whole adventure.

And yes, there is blood to be spilt  :=

barefoot



#84
Splash:



There are 3 possible endings in this game..............





#85
Cheers Monkey

I'll give that a whirl

:=

barefoot



#86
Hi

I have a dialog with an if else.. if the condition is true then the dialog closes and returns to game as normal if it is not it then the dialog stays open.

Have tried StopDialog (); in the dialog but still shows.

barefoot

#87
Hi Khris

thanks a lot for your report.

That's something I will need to to remember.. I got a bit worried there...

cheers Khris

barefoot

#88
Hi

By adding this to my new 'open CP' button they show up:

Code: ags

function Button4_OnClick(GUIControl *control, MouseButton button)
{
	gPanel.Visible=true;
	lblGamma.Visible=true;
	btnVoice.Visible=true;
	lblVoice.Visible=true;
	sldVoice.Visible=true;
	sldGamma.Visible=true;
	gIconbar.Visible=false;
  mouse.UseModeGraphic(eModePointer);
	
}


Other games still show as previous post.


barefoot

#89
Hi Khris

all labels text is 15 (white)...  i have opened saved games (copies) and they also have some labels and sliders missing:

Only showing:
Audio Volume and slider
Speed and slider

left hand buttons are ok..

Games by others i have either have complete custom panels or none so its difficult to know at the moment..

Basically i commented out ref to CP in global and added a button on CP to exit CP... played game and that's when I noticed.


cheers

barefoot



#90
Hi

I now notice that some of the labels don''t show on the control panel when playing game.

I've checked with other games and its the same...

Can anyone explain?

barefoot
#91
Hi Monkey..

Only got AGS 3.2.0

Not quite sure why some of the events panel for the views vanished and then returned.. mystery.. But all ok at the moment.

cheers

:=

barefoot
#92
Hi

eBlocking commands must finish before anything else happens..  eNoBlocking commands don't so other stuff can run as well.



barefoot
#93
Hi Khris

Didn't realise that..  Iv'e added it to my script files.

And yes, I have been reg for quite some time.. But only about 20 months at home.

Cheers

barefoot
#94
Hi Khris

thanks for your comments and accepted duly.

I need  if (key_clicks ==1)  and else if (key_clicks ==2) etc etc because each click makes an object appear (finger) so can't use (key_clicks < 5) if I want each finger to appear after each click..

That is why I have used repeated code for each finger object to appear..

I did not find it really hard but it was time consuming getting it just right..

Thanks Khris

barefoot


#95
Hi

found the problem and the solution. I was changing to animation view before the LockView... And also changing player views during..

So now I have this code and it appears to run ok for whatever view you are before interacting with object..  Works up to now, fingers crossed..

Code: ags

function obrickblade_Interact()
{
	  key_clicks++;
   
		 if (key_clicks ==1)
		 
	{

 
  object[21].Visible=true;
  object[21].SetView(24);
	
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[22].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;

		 
		 
	}	 

	else if (key_clicks ==2){
		 
  object[21].Visible=true;
  object[21].SetView(24);
	
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[24].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;
		 
		 
		 }	 

	else if (key_clicks ==3){
		 
  object[21].Visible=true;
  object[21].SetView(24);
	
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[25].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;

	
	
	}	 

	else if (key_clicks ==4){
		 
  object[21].Visible=true;
  object[21].SetView(24);
	
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[26].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;
	
		 
		 
		 }	 

	else if (key_clicks ==5){
		 
	cFrankj.Say("I'll make one final attempt!");
 
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
		
	Display("You manage to grab the key.");
	object[16].Visible=false;
	cFrankj.AddInventory(iKey);
	cFrankj.FaceLocation(185,170);
	object[12].SetView(19, 0, 0);
	object[12].Animate(0, 3, eRepeat, eNoBlock);
  cbjorn.Say("I'm so glad you sacrificed your fingers to get the Key. That shows promise.  The Key fits the lock of a metal box in the right hand corner of the room. Open it."); 
  object[12].SetView(20, 0, 0);
		 
} 
		
}


Hopefully my Perseverance has now paid off.

barefoot




#96
Hi

This appears to work for the Normal view interaction with object..  I need now to apply it for the Leg sawn off View. Would I need to replicate the code and change player.View==17?

Code: ags


function obrickblade_Interact()
{
	 key_clicks++;
   if (player.View==8){
		 if (key_clicks ==1)
	{

 
  object[21].Visible=true;
  object[21].SetView(24);
	cFrankj.ChangeView(26);
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[22].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;
	cFrankj.ChangeView(8);
		 
		 
	}	 

	else if (player.View==8 && key_clicks ==2){
		 
  object[21].Visible=true;
  object[21].SetView(24);
	cFrankj.ChangeView(26);
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[24].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;
	cFrankj.ChangeView(8);
		 
		 
		 }	 

	else if (player.View==8 && key_clicks ==3){
		 
  object[21].Visible=true;
  object[21].SetView(24);
	cFrankj.ChangeView(26);
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[25].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;
	cFrankj.ChangeView(8);
	
	
	}	 

	else if (player.View==8 && key_clicks ==4){
		 
  object[21].Visible=true;
  object[21].SetView(24);
	cFrankj.ChangeView(26);
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
	
	object[21].Animate(0, 2, eOnce, eBlock, eForwards);
  object[21].Animate(0, 2, eOnce, eBlock, eForwards);
	object[26].Visible=true;
	object[27].Visible=true;
  cFrankj.FaceLocation(75, 125);
	cFrankj.Say("Aghhhhhhhhh!! It's chopped a finger off!!");
  object[21].Visible=false;
	cFrankj.ChangeView(8);
		 
		 
		 }	 

	else if (player.View==8 && key_clicks ==5){
		 
	cFrankj.Say("I'll make one final attempt!");
 
	cFrankj.LockView(26);
  cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
  cFrankj.UnlockView();
		
	Display("You manage to grab the key.");
	object[16].Visible=false;
	cFrankj.AddInventory(iKey);
	cFrankj.FaceLocation(185,170);
	object[12].SetView(19, 0, 0);
	object[12].Animate(0, 3, eRepeat, eNoBlock);
  cbjorn.Say("I'm so glad you sacrificed your fingers to get the Key. That shows promise.  The Key fits the lock of a metal box in the right hand corner of the room. Open it."); 
  object[12].SetView(20, 0, 0);
		 
		 
}
}
}


Please let me know if you spot anything yuk.

barefoot



#97
Hi

For some reason my player character is not releasing an animation view and returning to the view he was before the object interaction. If you walk between clicks (have coded for 5+ clicks) it shows animation view even though I have used  cFrankj.UnlockView();!

There appears to be a few issues with LockView I believe?

There are 2 possible views for player before the interaction with object which after interacting need to return to the view before the interaction:

View 8:  Normal
View 17: has foot sawn off


Mouse Click 5:

Code: ags

 }
    else if (key_clicks ==5) {   // key clicks 

    cFrankj.Say("I'll make one final attempt!");
    cFrankj.LockView(26);
    cFrankj.Animate(0, 9, eOnce, eBlock, eForwards);
    cFrankj.UnlockView();
		
   Display("You manage to grab the key.");
   object[16].Visible=false;
  cFrankj.AddInventory(iKey);
  cFrankj.FaceLocation(185,170);
  object[12].SetView(19, 0, 0);
  object[12].Animate(0, 3, eRepeat, eNoBlock);
  cbjorn.Say("I'm so glad you sacrificed your fingers to get the Key. That shows promise.  
  The Key fits the lock of a metal box in the right hand corner of the room. Open it."); 
  object[12].SetView(20, 0, 0);
	
}


Hope this is understandable and you can see where I may have ****** up

cheers

barefoot



#98
Khris

you won't believe this...  The options of assigning a sound had disappeared!

This had been my first thought.

I closed AGS down and restarted.. now it's back..

strange happenings yet  again.

Will try both options.

Cheers Khris

barefoot

#99
Hi

I'm struggling with assigning a sound to an animation in a dialog.

I want the audio sound to work together when the animation begins.

I've tried stuff like:

Putting the sound around time of animation /

Linkaudio, Frame /

if (frame.LinkedAudio != null) frame.LinkedAudio.Play(); /

frame.LinkedAudio = asawing;

SetFrameSound

But as yet have not found the ideal solution.. No assign sound to frames in view events panel.

Can someone point out the best way..

cheers  if you can help / hint

barefoot


#100
Change the objects baseline in events panel to true..

bareoot
SMF spam blocked by CleanTalk