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

#1
Thanks everybody for your trouble.Well i took a different aproach.I placed a ticket validation machine by the busstop and after using the ticket,it "played" the script "busarrive" sequence.It was much easier for me.Anyways thank you all again for your trouble.
#2
Thank you very much for that.Very helpfull.
#3
Hello and thank you for your replies.Look,cego finds a ticket but its not the regular bus ticket.So he thinks if he can cut it,it would still pass as a regular bus ticket.So he finds a pair of scissors,cuts the ticket and produces a regular bus ticket.To do this i used iticket_UseInv() in the global script(and vice versa for the isciccors) and then produce a cutticket(icutticket).So i want when this happens (after a while,lets say 4 sec if possible(optional but more realistic)),the bus arrives.
#4
Thank you all.Both solutions worked like a charm.Can i ask NickyNyce why did you put two different "DoItOnce"?;-D
#5
Your advice was more helpfull than you can imagine.When i said vague i meant that reading the manual was putting me into the right direction but no solution for my problem.I know that you(or anybody in the forum)cant solve everybodys script problems but please be patient with us and our so many and sometimes stupid questions.I do not expect you to "write" my game,i want to do it my shelf by reading,trying and asking.And again i mean no disrespect.
For your second advice i thank you a lot.I will give it a try when i have the time.:(
#6
Hello again.I am having a little trouble with timers(among others...).In my game i want a letter to be slipped under the door after lets say 10 sec,the player turns to face the letter,walk towards it,picks up and reads it.So far so good.I have set the timer in loadroom and the actions in room_repexec(with the "if isTimeExpired").The problem is that this action keeps repeating every 10 sec instead of once as i want to.I have read the manual,read most of the other posts about timers and repexec but i am a bit confused since i just have started using AGS.Here is my code:
function room_Load()
{
  SetTimer(1, 400);
}
//After more lines...//
function room_RepExec()
{
if (IsTimerExpired(1)==1){
  oenvelope.Visible=true;
  oenvelope.Move(162, 260, 2, eNoBlock, eAnywhere);
  cego.FaceObject(oenvelope,);
  Wait(80);
  cego.Walk(205, 260, eBlock, eWalkableAreas);
  cego.Say("What is this ???");
  SetTimer(1, 0);
}
}
The last"SetTimer" was put after i've tried many times the rest of the script to run once,as a final solution,but no.
Wouldnt the timer had expired in the above script?If i wanted to reset it ,wouldnt i have to put"SetTimer(1,400) again at the end of the script?
I saw that maybe the problem would be the"Wait" and "eBlock".I am confused about that after reading the manual.And again if i remove the "wait" and change the"eblock",the player doesnt walk at the specific command.He stays where he was.

PS(1) please be as specific as possible because in my first post for another problem i had i've recieved a vague answer like "the manual explains it better"and so i couldnt figure a solution and dropped it off.No disrespect,i am gratefull for your help but for us begginers something more specific would have been more help.
PS(2)forgive my looong post...
#7
Thank you for pointing that to me.I assumed that repexec was for something to happen all the time ,not once.I am learning by reading tutorials and then return to the manual for further explanation.
Sorry for the trouble.
Good day to you too.:-D
#8
Thank you for the quick reply.I have done that but now nothing is working since i get a lot of errors in GlobalScript.Something (or everything) needs to be changed.
Here is my original script:
function room_AfterFadeIn()
{

if ((cego.ActiveInventory == icutticket) && (cego.Room == 4)){
  obus.Visible=true;
  aBusarrive.Play();//play engine sound//
  obus.Move(60, 450, 2, eBlock, eAnywhere);
  aBusidle.Play(0, eRepeat);//play engine sound//
If i put it in G.S nothing is working.How can i modify it to run the moment my character finds the ticket?
Forgive my ignorance.
}
#9
Hello to everybody.This is my first post and very thrilled about it.A question about where to put my script.I have my character finding a ticket and i want after this a bus arriving to pick him up.I have done the scripting and its working with sound and everything but i have put the whole function after room_fadein.For this to work i have to leave the room and come back again.I have tried putting it in the GlobalScript but i get an error.It doesnt recognise my "obus" object.Where should i put this script to run on cue?
SMF spam blocked by CleanTalk