Hi all!
Im trying that player throw a little marble to a NPC and latter slips and falls.
i have a NPC and player animations working fine; player throw the marble and NPC falls, but i need the marble moving from Player's hand to NPC's feet.
I made a object in the room and selected "false" in "Visible" propierties.
Firsty,i tried that object come in view when player View loop(player throw marble) end.
else if ((player.HasInventory(icanica)) && (player.ActiveInventory==icanica))
{
player.Walk(629, 509, eBlock);
player.FaceCharacter(cPortero);
cEgo.LockView(1);
cEgo.Animate(8,5);
cEgo.Say("DAME SUERTE CANICA!");
cEgo.UnlockView();
oCanica.Visible = true;
cPortero.LockView(3);
cPortero.Animate(8, 3, eOnce);
}
it give me this error:
GlobalScript.asc(599): Error (line 599): Undefined token 'oCanica'
then i tried with "Object[ID].Visible=true"
so i recieve this error:
GlobalScript.asc(599): Error (line 599): fixed size array cannot be used in this way
how can i do, mainly to object comes in view, secondly to start object animations and ending to move it.
Thanks for your time and help.
I can say this..
Quote
then i tried with "Object[ID].Visible=true"
You could try this..
object[0].Visible = true; //0 or what the ID of object is
Globally, the objects are referenced with their IDs, not by their names.
yes, sorry, i was not explain correctly. I meant i try with:
Object[0].Visible=true
Just do what Vincent suggested and use "object[0]" instead of "Object[0]". Capitalization matters.
oh, correct! thnks!
now the object come to view!
to continue i will try to animate and move it.
thnks Vicent and Kris!
ok i have another doubt: how can i assign object a view??
while i'll try to move it...!
ARRG! sorry,sorry...Set.View(4,0,0)
Somedays i can read...
:-D
Quote
how can i assign object a view??
while i'll try to move it...!
Well, I guess this also could help you..
While :
while ( expression ) {
statements
}
Runs statements continuously, while expression is true.
For example:
while (cEgo.Moving) {
Wait(1);
}
will run the script Wait(1); repeatedly, as long as cEgo.Moving is not zero. Once it is zero, the while statement will exit at the end of the loop.
Quote from: Vincent on Sun 22/06/2014 20:30:49
Quote
how can i assign object a view??
while i'll try to move it...!
Well, I guess this also could help you..
While :
while ( expression ) {
statements
}
Runs statements continuously, while expression is true.
For example:
while (cEgo.Moving) {
Wait(1);
}
will run the script Wait(1); repeatedly, as long as cEgo.Moving is not zero. Once it is zero, the while statement will exit at the end of the loop.
thanks very much Vicent! i will try, it could be very usefull (nod)
Glad to have been of help
Quote
thanks very much Vicent!
"Vincent" it's okay :)