Aller au contenu

Photo

Two small things: Game clock UI & Animation on spawn


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
casadechrisso

casadechrisso
  • Members
  • 726 messages
Probably noob questions for the experienced builders, but I'm currently pulling my hair out over some minor things:

1. That small game clock UI that sits on top of the options button since MotB: It's disabled by default and I know it has to be activated in some script, but I've searched around for hours and still have no clue... can someone point me at the place where I activate it?

2. I'm trying to get a creature spawn with an animation. I know OnSpawn scripts don't work, so I already made a heartbeat one. Usually I get humans/NPCs done, but in this case I have a wolf that just doesn't want to lie down. Strangely once I click on it (when play testing), the stupid creature does what it should. The goal is to make it appear sleeping and don't react to any poke by the player:

 void main()

{   
ActionPlayAnimation(17, 1.0, 4000.f);        //  <- isn't there an option to play the animation just forever?
SetOrientOnDialog(OBJECT_SELF, FALSE); 
ExecuteScript("nw_c2_default1", OBJECT_SELF);
}

Above thing doesn't do anything unless the wolf is clicked on (talk to), in which case it at least lies down. When clicked on again, it stands for a moment, then lies down once more. I'd rather just have it spawn lying around doing no animation at all (but it should be alive for a later one-liner dialogue that appears when talked to). 

Modifié par casadechrisso, 31 août 2010 - 02:42 .


#2
c i p h e r

c i p h e r
  • Members
  • 261 messages
I've had no luck with ActionPlayAnimation. I think it's broken. It's a carry over from NWN1. What works for me is PlayCustomAnimation. To lie down, try the "laydownB" animation string. I *think* that will do it, but I don't have the toolset in front of me atm. A lot of this is going to be trial and error to get it how you want it.

#3
casadechrisso

casadechrisso
  • Members
  • 726 messages
Hey cipher, and thanks... I replaced the ActionPlayAnimation with the PlayCustomAnimation, but I'm afraid it doesn't work. IIRC, I tried this before long ago, but the custom animations don't seem to work with animals, unless I did something wrong - that's why I used ActionPlayAnimation in the first place.

#4
Guest_Chaos Wielder_*

Guest_Chaos Wielder_*
  • Guests
If you want a wolf to stay down, try this:



AssignCommand(OBJECT_SELF, ClearAllActions(TRUE));

PlayCustomAnimation(OBJECT_SELF, "*proneB",TRUE);

#5
casadechrisso

casadechrisso
  • Members
  • 726 messages
That did it, Chaos Wielder. Thank you so much!





Any ideas about the in game clock?

#6
Guest_Chaos Wielder_*

Guest_Chaos Wielder_*
  • Guests
Put this as your "OnClientEnter" on the module properties:



#include "ginc_time"

void main()

{

SetGUIObjectHidden(GetFirstPC(), "SCREEN_PLAYERMENU", "CLOCK_BUTTON", FALSE);

UpdateClockForAllPlayers();

}



That should work.

#7
casadechrisso

casadechrisso
  • Members
  • 726 messages
 Okay Chaos, you're hired. Finish Shagret, pack your things and get over here.  :whistle: