Summoned Creature Turns Into Hostile

Post » Tue Jun 19, 2012 6:51 pm

Like the final Conjuration Quest of winterhold college. You summon an actor that attacks anyone. I post the code I wrote:
Scriptname HostileSummon extends ActorEvent OnLoad()  self.SetRelationshipRank(Game.GetPlayer(), -4)  Game.GetPlayer().SetRelationshipRank(self, -4)  self.SetAv("Aggression", 1)  self.StartCombat(Game.GetPlayer())endEvent

But doesn't work.. suggestions?
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Post » Tue Jun 19, 2012 11:54 am

Does it run? Have you tried a trace or debug?
User avatar
kyle pinchen
 
Posts: 3475
Joined: Thu May 17, 2007 9:01 pm

Post » Tue Jun 19, 2012 3:24 pm

Does it run? Have you tried a trace or debug?

Yes, Debug.MessageBox("jesus"), when I use the spell the box appears, but nothing else happens.
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Tue Jun 19, 2012 1:20 pm

Does OnLoad work with the Actors ?

Try maybe with a OnLocationChange event. It would work if the summoning is considered by the game as a location change.

Or if you set up a default package for the summoned creature, try a On PackageStart event, when you summon it, it will start using its package and the event may load this way.
User avatar
Lily Something
 
Posts: 3327
Joined: Thu Jun 15, 2006 12:21 pm

Post » Wed Jun 20, 2012 2:08 am

Does OnLoad work with the Actors ?

Try maybe with a OnLocationChange event. It would work if the summoning is considered by the game as a location change.

Or if you set up a default package for the summoned creature, try a On PackageStart event.

This isn't the problem, I tried Debug.MessageBox(self) and the correct name of the actor appears. Damn :(
User avatar
danni Marchant
 
Posts: 3420
Joined: Sat Oct 07, 2006 2:32 am

Post » Tue Jun 19, 2012 2:58 pm

I think the problem may be your script runs before the summoned creatures relationship to the player is set by the summon entry point trying on package start may help or try utility.wait (2) at the start of your unload event script.
User avatar
Tammie Flint
 
Posts: 3336
Joined: Mon Aug 14, 2006 12:12 am

Post » Tue Jun 19, 2012 5:00 pm

I think the problem may be your script runs before the summoned creatures relationship to the player is set by the summon entry point trying on package start may help or try utility.wait (2) at the start of your unload event script.

Mmm.. now I try, but I used Debug.MessageBox() to test every variable and the changes are valid..
User avatar
john page
 
Posts: 3401
Joined: Thu May 31, 2007 10:52 pm

Post » Tue Jun 19, 2012 3:41 pm

It doesn't work ;(
User avatar
Andrea Pratt
 
Posts: 3396
Joined: Mon Jul 31, 2006 4:49 am

Post » Tue Jun 19, 2012 10:42 am

Its possible you can't make a summon hostile to its summoner. The quest you are talking about may use a script to move the creature in rather than the summon effect. Of course you could do something similar.

Just speculation, I haven't done much with relationships so I can't validate you script is correct.
User avatar
Tania Bunic
 
Posts: 3392
Joined: Sun Jun 18, 2006 9:26 am

Post » Tue Jun 19, 2012 4:17 pm

possiblitiy 1)
Try to remove the summoned creature from all factions. This is different from relationships. Without a faction, it has no allies.
possibility 2)
Try to pin the Frenzy spell effect on the creature after it is summoned.
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Tue Jun 19, 2012 2:19 pm

Its possible you can't make a summon hostile to its summoner.

I got killed by my own Storm Atronoch yesterday...it just attacked me out of the blue...we weren't even fighting anything. I had dropped a bunch of loot about 30 seconds earlier, maybe something bounced at it and upset it? but that doesn't explain why it waited before kiiling me.
User avatar
Krystal Wilson
 
Posts: 3450
Joined: Wed Jan 17, 2007 9:40 am

Post » Wed Jun 20, 2012 12:57 am

possiblitiy 1)
Try to remove the summoned creature from all factions. This is different from relationships. Without a faction, it has no allies.
possibility 2)
Try to pin the Frenzy spell effect on the creature after it is summoned.

1) Already tried.
2) I'm going to prove it tomorrow ;)
Thanks to everyone for help I will let you know!
User avatar
Josh Dagreat
 
Posts: 3438
Joined: Fri Oct 19, 2007 3:07 am


Return to V - Skyrim