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

#201
Hi Studio3 and guys

Let's not get into a JFK turkey shoot..

Well, according to your profile Studio3 you are just 16... its an age where you don't always realise what you say and do... and then there's me.. an old git (55) and its the same again.. maybe worse...  (I have 3 sons who were all 16 at some time).

some of us become brain dead over the years and that makes it even harder, especially if information gets shredded as it enters the mind..if there's any left..

Don't forget that I grew up when rationing hadn't ended and loo's were always 20 yards down the garden and bath night was the old tin bath in front of a coal fire!

Yes, advanced technology is such a whiz... (I threw my abacus away years ago)..

If Studio3 is really 16 then he should be treated like any other 16 year old.. kid gloves..

I hold very high regards for Khris, Monkey, Calin and some others..  If I f*** up then I have to take the blows.. the price for fame is high indeed..

Enough said I thinks...

:=

barefoot


#202
Hi Monkey

Yes, as you say, the C is no longer required in char properties.  One of course assumes it is named and denoted as such. That's all I was trying to saying..

Thanks for the extra info Monkey..

Hope it gets sorted Studio3.

:=

barefoot




#203
You have to write it SayAt and not sayat and it has to be indented and include the c and make sure chars name is actually Dave or dave. (Is the char named without the c in its properties?)

Indent: Add a Space before text :

Code: ags
 
@1
   cDave.SayAt(8, 167, 320,"Dave: I like waffles.");


Try it

barefoot


#204
Hi

I use c with char name and it works.. no need to fix it  :=   it errors if you don't put c in at indented SayAt..

paste your code here...

barefoot
#205
Hi

After indenting (tab space) SayAt you use the c for character as usual: cdave..you have not.

This works

Code: ags

wizard2: Match
   object[1].SetView(15);
   object[1].Animate(0, 3, eRepeat, eNoBlock, eBackwards);
    cwizard.SayAt(160,80,170,"Correct. Ok. I'll let you pass. But watch your back very carefully Magrid!!");
  object[1].SetView(15);
    object[1].Visible = false;
   cwizard2.ChangeRoom(25,258,226);


Your Video line should be: eVideoSkipNotAllowed (Note caps);
You have also not put in Video format and make sure Video is in the complied folder.

so something like:

PlayVideo("homework.avi", eVideoSkipNotAllowed,0);   - player can't skip video

Have never tried playing videos within dialog yet but I'm sure you could.

barefoot



#206
Thank you very much Monkey

Update: after some tweaking it works a treat  :=

------------------------------------------------

I had this idea in mind but was a little unsure of doing it..

cheers again

barefoot
#207
Hi

Iv'e looked here, on internet and tried scripting but to no avail so far.

I'm trying to disable a gui button after it has been mouse clicked x amount of times..

I have a score system set up which affects score if conditions are met (after button has been clicked on);

I don't need it disabled when score reaches x.. (which can be easily done) as i have other buttons which can affect the score also.

I have 7 buttons that i need to check how many times they've been mouse clicked on.

I am also looking into variables (ints) for a way if this be a solution.

Have made Variable: fire, int...  I think i need a way to take one off each time a button is clicked on and disable button when it reached 0.

cheers for any guidance.

barefoot










#208
oops





#209
Hi Monkey

Yes I understand what you are saying.. obviously the object needs to turn on and off... in this case I have turned off much too early.. it was a silly oversight i'm afraid.. Im sure we've all felt stupid at some point...

I know you don't mean to be rude and i'm sure you've come across this once too often as such and it p***** you off... You just need to be more flexible in your approach to reading and answering, seriously.. or just don't answer at all.. which would be a shame as I generally appreciate your solutions as well as others. I have a very low term memory which means i can only hold info for a short while and that's something I have to live with. Not making excuses and I will try even harder.

I have now sorted this out and everything works as it should..

Cheers

Barefoot





#210
Hi

that fails to work as well in rep exec....

object 7 exists as it runs ok with animation. for the record will collide still run if object animates and then visible false?

i have other options i am looking at

cheers

barefoot





#211
Hi Khris


UPDATE: Have found a suitable solution to this problem

---------------------------------------------------------------------
I did have it but it messed up and went pear shaped...

a button sets off an object visible and animates should a player be cwizard.x > 150 && cwizard.y > 117

this works fine with an else of "He is out of shot" with object not visible. This also works..

In the room rep exec i set up if char collide with object:

Code: ags
 

 {
  if (cwizard.IsCollidingWithObject(object[7]))
  cwizard.Say("Aghhhhhhhhhhhhhhhhhh!!");
  GiveScore (-1);
   SetGlobalInt (1, 100);
  
	}


Unfortunately this fails to happen..

barefoot

#212
Hi

cheers Matti

but i'm getting:


Failed to save room room30.crm; details below
room30.asc(126): Error (line 126): Type mismatch: cannot convert 'Object*' to 'int'


barefoot

#213
Hi

I have now sorted this out and everything works as it should..


Aghhhhhhhh I need a very gentle hand with this code for it to work properly... Will you please help.....

In rep exec:

Code: ags
if (cwizard.x >150 && cwizard.y > 137)&& (cwizard.IsCollidingWithObject(object[7] == 1))
} 

  cwizard.Say("Ouch!!");
  GiveScore (-1);
   SetGlobalInt (1, 100);


Or could have if an object is visible and player at given location.

All help appreciated

barefoot





#214
Hi Monkey

if you include buttons - then yes.. about 30.. still, strange how the icons vanished and then returned when ags restarted.. anyhow..

Thanks monkey -  something to be remembered..

barefoot
#215
Hi

Is there a Label limit and if so, how many?

I noticed that the GUI icons have now vanished from the top of the window so i can't add a new label on a GUI... (I have  26)

Strange.. I restarted AGS and it now appears as normal and I can add more labels..


barefoot
#216
Hi Monkey

yes, the spell character (cwizard) animates before casting spell (throws an object at main character (cwizard2) such as a fire ball).. The spell character (cwizard) does not move (walk) as such,  at the moment .

This is an eBlock action and I also check if object collides with character. I have set this up in rep exe but its not working properly at the moment.

The player character can resume moving only once the spell has finished (object thrown and after its animation) because its eblock.

The spell (object move) goes in straight lines. I have not set it up to follow the player character. Also i want to be able to make it bounce off solid items.

I have not got everything down to a fine art yet, i can make a variable but am not fully aware of all its uses yet so you'll have to excuse my ignorance and perseverance to gain further knowledge from resources as well as from experienced scripter's like yourself...

This scenario has only just begun (its the finale).. once I have one bagged then the rest will be a lot easier and will install more knowledge and skills..

As my last post stated, i have the room divided into two oarts and the objects shoots depending what part you are in ie left or right..  Of course it would be great to detect what part of the room the player is at wherever he is..  still..

Heres what I have if player walks on Region (Don't be too harsh on script presentation)

Code: ags

function region2_WalksOnto()
{
 if (cwizard2.x >= 163 && cwizard2.y >= 130) {

  cwizard.ChangeView(37);
 cwizard.Animate(0, 4);
  cwizard.ChangeView(12);
  object[6].Visible = true;
 object[6].Move(181, 170, 12, eBlock);
	
 ofire.SetView(42, 0, 0);
  ofire.Animate(0, 1, eOnce, eBlock, eBackwards);
  object[6].Visible = false;
}
 else if (cwizard2.x <= 163 && cwizard2.y >= 130) {

  cwizard.ChangeView(37);

  cwizard.Animate(0, 4);
  cwizard.ChangeView(12);
 object[6].Visible = true;
 object[6].Move(100, 170, 12, eBlock);

  ofire.SetView(42, 0, 0);
  ofire.Animate(0, 1, eOnce, eBlock, eBackwards);
  object[6].Visible = false;

}
 
}


And:

Code: ags

function room_RepExec()
{
   if (cwizard2.IsCollidingWithObject(object[6])) 
  cwizard2.Say("Ouch!!");
}


Any help/advice appreciated

cheers

barefoot


#217
Hi

I was thinking along these lines:

Code: ags
{
 if (cwizard2.x == 163 && cwizard2.y == 210) {


Say I divided the screen into 2 parts (vertically) and have above code with  >=  and   <= operators and have events for both.

Should I have this:

Code: ags
{
 if (cwizard2.x >= 163 && cwizard2.y >= 130) {
//Do this



Code: ags
{
 if (cwizard2.x <= 163 && cwizard2.y >= 130) {
//Do this


Perhaps from a Region if conditions are met?

I have tried this and it works ok for what it is...

Also if char collides with object event...

what would be the best way to incorporate this besides what i have in code, assuming it is ethical?

cheers

barefoot





#218
Hi

I'll check that out

cheers

barefoot
#219
Hi

I can't seem to find much for my latest scenario and I'm scratching my head trying to find a solution..

Scenario:

A Character throws a spell (object) at Main Character. If it hits Main Character then it causes an event.

If object hits something else it will ricochet off (can do objects collide).

What I would like to do is determine where the main character is and project the object in that direction..

I suppose I may be able to uses players x y to determine projection of object...

Some help with basic direction assistance would be welcomed.

cheers

barefoot


#220
Hi

I love the Ben Jodan games

Roll on case 8

:=


barefoot
SMF spam blocked by CleanTalk