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

#21
ok, I found the resolution. 




if (character [GetPlayerCharacter()].activeinv == 8){
 
SetCharacterView (EGO,16);
AnimateCharacter (EGO,0,5,1);
Wait(18);   // <---this is important. Without it the animation can't be seen
ReleaseCharacterView (EGO);


SetObjectView (3,15);
AnimateObject (3, 0, 1, 1);

DisplaySpeech(EGO,"Oh no the cable went out! Must be the damn antenna again.");


int blubba;
blubba = GetGlobalInt(4);
blubba++;
SetGlobalInt(4,blubba);}



else {
DisplaySpeech(EGO,"I don't wanna use this with my TV.");}





#22
I have to release the characterview right away.

I try to describe what I was trying to do a little more detailed:

The character has a remote control(inv item 8). if it is used on the tv (object 5) the character shall move his arm and "press" the remote control. after that the tv shall bring a picture.

this works fine if I use the predefined help-funkctions. but I want an own script so, that I can modify some GlobalInts and use some "else if's" and elses.


If I don't release the characterview my buddy walks around using the remote all the time. If I release it later (after the object animation is finished), it stays as before:
the object animates, the character walks normal, but he doesn't move his arm and doesn't press the remote control.
I apollogize for my bad english
#23
hello I have a simple question.
I recently started programming a adventure game with ags.

during scripting I a error accured:

I tried to do this:

object 5
conditional (if inventory Item was used) : 8
quick animation (view 16, loop 0, speed 12)
change obejct view : 3
animate object: 5

that works fine, but I wanted to wirte it as a script, so that the character displays a speech, when any othe item was used.

I got so far:

if (character [GetPlayerCharacter()].activeinv ==  8 ) {
 
SetCharacterView (EGO,16);
AnimateCharacter (EGO,0,12,0); (last value is for boolean False)
ReleaseCharacterView (EGO);

SetObjectView (3,15);
AnimateObject (3, 0, 1, 1);
DisplaySpeech(EGO,"Oh no the cable went out! Must be the damn antenna again.");



}
else {
DisplaySpeech(EGO,"I don't wanna use this with my TV.");} 



But now the character doesn't do the animation anymore. what is wrong??
the object animation works fine and the message is displayed. I don't see the error. can anybody help?
I already tried a lot.
SMF spam blocked by CleanTalk