detection of new world spacelocation

Post » Sat Nov 17, 2012 7:49 am

Hi,

Im currentlu working of implementation of minion system. It allows you to issue picked actors dimple commands like follow, wait, wait there, forward. Now, I have 1 problem. When I issue follow command the minions follow me using custom follow&keep distance package. When I enter city or building/dungeon the minions follow me, however when I leave building/dungeon or city the dont follow me. I use GetLocation and GetWorldSpace commands to determine if I have entered new world space/location and if necessary move all my minions to my position using MoveTo. Anyone can give me some tips in this regard?
User avatar
James Baldwin
 
Posts: 3366
Joined: Tue Jun 05, 2007 11:11 am

Post » Sat Nov 17, 2012 3:49 pm

I use GetLocation and GetWorldSpace commands to determine if I have entered new world space/location and if necessary move all my minions to my position using MoveTo. Anyone can give me some tips in this regard?

I'm curious, how come you are doing that? I just released an animal follower mod and I too have those custom menu options and my animals follow without me having to manually move them. I did have to modify the race settings, but that was all.
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Sat Nov 17, 2012 7:53 am

I'm curious, how come you are doing that? I just released an animal follower mod and I too have those custom menu options and my animals follow without me having to manually move them. I did have to modify the race settings, but that was all.

Well, Its quite complicated. You see I have created a minion system which basically allows you to make most of actors your minions that is actors you can issue simple commands. Currently I use this system to allow my alpha werewolf to summon nearby wolves and werewolves to your aid by howling. The wolves/werewolves come to you and you can issue them simple commands I described above. In fact the system is far more flexible and in future I will use it more extensivly. For example I will charm any actor to follow you. Sadly the system doesnt work on raise dead due to AI problems with that kind of actors. It is done by forcing current actor into alias reference of quest which has a follow/keep distance package. As I have said everything works fine except when I change world spaces. Without scripts they will not follow me, but with scripts that move them to player they will. Problem is I seem not to be able to detect change of world space. Of course other commads are handled differently. But that is irrilevent. It has nothing to do with my problem.
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Sat Nov 17, 2012 7:33 pm

Well, Its quite complicated. You see I have created a minion system which basically allows you to make most of actors your minions that is actors you can issue simple commands. Currently I use this system to allow my alpha werewolf to summon nearby wolves and werewolves to your aid by howling. The wolves/werewolves come to you and you can issue them simple commands I described above. In fact the system is far more flexible and in future I will use it more extensivly. For example I will charm any actor to follow you. Sadly the system doesnt work on raise dead due to AI problems with that kind of actors. It is done by forcing current actor into alias reference of quest which has a follow/keep distance package. As I have said everything works fine except when I change world spaces. Without scripts they will not follow me, but with scripts that move them to player they will. Problem is I seem not to be able to detect change of world space. Of course other commads are handled differently. But that is irrilevent. It has nothing to do with my problem.

Sounds cool. I do pretty much the same thing - I have the follower package on the alias, but I don't have any problems with the following. I think I know why though... if you allow any random animal to become a follower, by default, they don't travel through doors. That's the change I made for my animals.

Are you using the http://www.creationkit.com/OnLocationChange_-_Actor? I've used it, but only in the Tamriel worldspace, so I don't know how it works for changing worldspaces like you're doing. Hopefully the event will be enough so you know it's changed and can bring them to you?
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Sat Nov 17, 2012 6:35 am

Sounds cool. I do pretty much the same thing - I have the follower package on the alias, but I don't have any problems with the following. I think I know why though... if you allow any random animal to become a follower, by default, they don't travel through doors. That's the change I made for my animals.

Are you using the http://www.creationkit.com/OnLocationChange_-_Actor? I've used it, but only in the Tamriel worldspace, so I don't know how it works for changing worldspaces like you're doing. Hopefully the event will be enough so you know it's changed and can bring them to you?

Damn, I tried to attach script to player via quest alias and use OnLocationChange event but its not working. I even tried Oninit Event and still no result!
User avatar
Rhi Edwards
 
Posts: 3453
Joined: Fri Jul 28, 2006 1:42 am

Post » Sat Nov 17, 2012 8:20 am

Damn, I tried to attach script to player via quest alias and use OnLocationChange event but its not working. I even tried Oninit Event and still no result!

Okay, I did some testing to make sure it worked. Make sure your alias is getting filled and try attaching this test script to the alias:
Scriptname TESTLocationChange extends ReferenceAliasEvent OnLocationChange(Location akOldLoc, Location akNewLoc) Debug.messagebox("Location=" + akNewLoc)endEventEvent OnInit() Debug.messagebox("init")endEvent
User avatar
Dean
 
Posts: 3438
Joined: Fri Jul 27, 2007 4:58 pm

Post » Sat Nov 17, 2012 5:41 am

Okay, I did some testing to make sure it worked. Make sure your alias is getting filled and try attaching this test script to the alias:
Scriptname TESTLocationChange extends ReferenceAliasEvent OnLocationChange(Location akOldLoc, Location akNewLoc)Debug.messagebox("Location=" + akNewLoc)endEventEvent OnInit()Debug.messagebox("init")endEvent


I have created a script again. This time it works (OnInit event) but it wont work properly. It doesnt detect when I enter Droagons reach or any interior cell or if I return. If I check every 7 secons if the actor is in the same location as player it works better but I still can not detect all transits. I am confused.
User avatar
Matthew Warren
 
Posts: 3463
Joined: Fri Oct 19, 2007 11:37 pm

Post » Sat Nov 17, 2012 8:34 am

I did something lika that every 7 seconds:
GetCurrentLocation() || Game.GetPlayer().GetCurrentLocation() != MinionArray[a].GetCurrentLocation() || Game.GetPlayer().GetDistance(MinionArray[a]) > 5000 || Game.GetPlayer().GetDistance(MinionArray[a]) == 0)

Works well, but its not very ecologic
User avatar
Jade Payton
 
Posts: 3417
Joined: Mon Sep 11, 2006 1:01 pm


Return to V - Skyrim