Only you can see these enemies

Post » Tue Jun 11, 2013 7:57 am

Hi,

I'm making a mod where the player has illusions of beasts attacking him. Problem is, I can't make them only visible to the player, meaning that currently, guards are attacking them, and peasants flee screaming "need help" etc. I have dragons, so I'm guessing the problem is harder.

I tried factions but with no results.

So there are two problems :

- Illusions should not be attacked or noticed by anyone.

- Illusions should not attack or notice anyone else than the player.

And a final question : is there a way to simply create an objectreference with a script, from an actor at a XMarkerH ? I can't find an answer to this stupid question :) (to call the illusions directly without the need of creating them in the CK in a cell)

Thanks

User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Tue Jun 11, 2013 7:47 am

XMarkerProperty.PlaceAtMe(IllusionBeast,3)?

User avatar
El Khatiri
 
Posts: 3568
Joined: Sat Sep 01, 2007 2:43 am

Post » Tue Jun 11, 2013 4:09 pm

Easy, but I didn't even knew that function :) Thanks!

And don't forget the real questions :)

User avatar
Isabel Ruiz
 
Posts: 3447
Joined: Sat Nov 04, 2006 4:39 am

Post » Tue Jun 11, 2013 2:24 pm

ActorBase Property IllusionBase AutoActor Property PlayerRef AutoFunction SpawnIllusion(int aiCount)    while aiCount        aiCount -= 1        Actor kTempRef = PlayerRef.PlaceActorAtMe(IllusionBase)        kTempRef.StartCombat(PlayerRef) ;you can also try kTempRef.SendAssaultAlarm() - this may prevent guards from attacking?    endWhileendFunction

I'm just not sure about the first one with preventing guards from attacking.

Also, instead of placing the illusions directly on top of the player, you could spawn them in a detached cell, and then move them to positions around the player, using trig like the one in this example http://www.creationkit.com/ObjectReference.MoveTo_%28Papyrus%29

User avatar
GRAEME
 
Posts: 3363
Joined: Sat May 19, 2007 2:48 am

Post » Tue Jun 11, 2013 5:19 am

In the current state of the mod, illusions are placed in a cell and MoveTo a XMarker randomly placed around the player.

Your code is not the solution ; because it doesn't change anything, the combat will start and the guards will attack the illusions. And Dragons, for a reason I can't understand disregard StartCombat(playerref).

Thanks anyway.

User avatar
Da Missz
 
Posts: 3438
Joined: Fri Mar 30, 2007 4:42 pm


Return to V - Skyrim