Aller au contenu

Knight statue coming to life


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

#1
Guest_dewkl_*

Guest_dewkl_*
  • Guests
Anyone remember where in the game these are found?

You would walk across a trigger and they would come to life and attack you. I can't find these in the creature list.

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
I don't remember but I think what you have to do is create a creature template and use it to place the creatures in the area, possibly with a petrify/frozen effect and remove the effect and make them hostile when the trigger is entered.

I am planning something similar with one of my areas and I'll get around to doing that in a day or two - if you don't get a reply before then, I will post what I find/do to get it working.

#3
Sunjammer

Sunjammer
  • Members
  • 925 messages
I haven't tested it yet but I'd suspect SetCreatureIsStatue is what you are looking for. Use it in the creatures spawn event to make the statue and use it again in the trigger's enter event to bring them back to life.

Mmm ... wonder if we can make Dr Who style "weeping angles" ...

#4
TimelordDC

TimelordDC
  • Members
  • 923 messages
That's a neat function; thanks Sunjammer. I'll use it to test my area.



Weeping Angels...need to read up on them :)

#5
FergusM

FergusM
  • Members
  • 460 messages
They're used in Redcliffe Castle if you go after Connor, in the room adjacent to the main hall.

Modifié par FergusM, 20 avril 2010 - 01:59 .


#6
Guest_dewkl_*

Guest_dewkl_*
  • Guests
Thanks for all the replies. I'll try to find that area Fergus.

I couldn't find the creature in the appearance list. I went through every entity. I'm guessing it's just a human using a set of armor.

I tried the function SetCreatureIsStatue(OBJECT_SELF, TRUE); in the EVENT_SPAWN, but it doesn't seem to work. Also tried setting the last parameter to 1.

Modifié par dewkl, 20 avril 2010 - 03:14 .


#7
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
That's also used in the Brecillian Forest for the trees coming to life, in case you can't find the Redcliffe level.

#8
Guest_dewkl_*

Guest_dewkl_*
  • Guests
I thought it didn't work, but it does. It doesn't do what I thought it would.



The creature will follow the player with its head and appear fully interactable. I don't think this is how they done it. I'm trying to look at the redcliffe/forest level but I can't find the trigger/script.

#9
Sunjammer

Sunjammer
  • Members
  • 925 messages
Sounds like you need to add a call to SetObjectInteractive to stop that.

This would mean setting SetCreatureIsStatue to TRUE and SetObjectInteractive to FALSE on spawn and then reversing that via your trigger or plot flag.

#10
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I'm trying to SetCreatureIsStatue on sylvans at spawn in my level and it doesnt seem to work. I have the creature set to non-interactive, and have the following script as the sylvan's script. .

Any ideas what's wrong?

#include "events_h"
#include "global_objects_h"

void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);

switch(nEventType)
{
case EVENT_TYPE_SPAWN:
{

SetCreatureIsStatue(OBJECT_SELF, TRUE);

break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_CREATURE_CORE);
}

Modifié par Kilrogg_, 30 mai 2010 - 03:17 .


#11
Guest_dewkl_*

Guest_dewkl_*
  • Guests
To my knowledge;
Sylvans do not use any script to be activated. The creature is in a neutral group with interactive set to false, and have set "Go hostile on perceive NPC" to true in creature variables. This triggers the default intro animation, like with spiders. If you want to make a custom sylvan (not using the default creature), I'd guess there's a talent or something connected to this. 

For those interested knowing about the statues: The statue ambush room uses SetCreatureIsStatue. Here's the code. The statues are called "arl220cr_suit_of_armor", neutral group, interactive set to false, human appearance with no head morph. 

Modifié par dewkl, 30 mai 2010 - 04:23 .


#12
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I'm just trying to have frozen sylvans that come to life on a trigger. What solution did you end up using for your mod?



UT_TeamGoesHostile + SetObjectInteractive?

#13
Guest_dewkl_*

Guest_dewkl_*
  • Guests
I did something different than what I asked about here. I had statues and made creature ghosts who appeared. I didn't make any sylvans.

I think UT_TeamGoHostile would turn all the sylvans hostile, you can use SetGroupId to set the instances individually instead or just give them a shared tag if you want to enable multiple. Try this.

Modifié par dewkl, 30 mai 2010 - 04:49 .


#14
Kilrogg_

Kilrogg_
  • Members
  • 296 messages
I got it to work with TeamGoesHostile, it actually uses the Team ID of the creatures, so I just put the different groups of sylvans in different Team IDs.



Now I'm going to see if I can get some of them to go interactive/hostile on a spell casted by a mage near them when the mage enters combat... that should keep me busy for a while ><

#15
Guest_dewkl_*

Guest_dewkl_*
  • Guests
I confused team with group, I don't know much about teams. I guess it would be a much better use in that case. As for the other script, you can just ask around here if you get stuck.

Modifié par dewkl, 30 mai 2010 - 05:02 .