Drive-able Cart question?

Post » Mon Jun 18, 2012 3:21 pm

EDIT AGAIN: Nearly Complete, need some more advice.

After searching through these forums I read http://www.gamesas.com/topic/1349649-dynamically-attaching-scripts-to-actors-near-the-player/page__p__20348867__hl__scripts__fromsearch__1#entry20348867 thread on using Quest Aliases and thought I could use it for the problems I have been having with companions.

Right now the only way I can add a companion to a cart is by making a seperate script for every companion, and using a IsDongFavor function on the cart. But for some reason it was also activating the cart for the player, which looked bad and wasn't what I intended, also I wasn't sure how I was going to handle getting them off the cart :wink:.

After that thread I figure I should be able to do it with Aliases, but for some reason it isn't working. I have made the quest, with the following Match Conditions:

 S | GetFactionRank | Faction: CurrentFolloweFaction | >= | 0.000 | ORS | GetFactionRank | Faction: CurrentHirlingFaction | >= | 0.000 | OR

I then have this script attached:
Spoiler
Scriptname Driveablecartcomp1 extends ReferenceAliasfunction AttachToCart(bool bDoAttach)if bDoAttach  Closest.SetVehicle(DriveableCart1)  Utility.Wait(0.1)  Closest.PlayIdle(CompanionCartIdle)endifendfunctionObjectReference property DriveableCart1 AutoIdle property CompanionCartIdle AutoActor property Closest Auto

To my understanding, I should then be able to use a "CompanionCartQuest.Start()" in my script when I activate the cart, and then every NPC in the loaded area (I have that checked in ALias tab too) who meets the conditions of being above one of those afore mentioned ranks should play the script I provided.

Well, for some reason in won't work at all. Checking the debug messages shows a line in the script I use for the player (with the CompanionCartQuest.Start()) is "Assigning None to a non-object variable named "::temp6"" or mentioning no 3D object present. TO my knowledge this means that the QuestAliases are triggering, yet aren't finding a nearby actor to apply the script too? Lydia was standing next to me and I had her property assigned in the script within the Alias.

Is there a problem with the GetFactionRank condition? Is there something I am missing in the Alias itself? Any ideas at all what the problem is?

OP:

Hello,

I've been working on a mod to rebuild the Helgen area. In getting used to the new CK features I decided not to take anything seriously and intentially destroyed the game intro for kicks in my esp.

Out of curiosity I started a new game, and realized I could take control of the cart at the intro.

http://www.youtube.com/watch?v=X369WcykGBM&context=C3790db5ADOEgsToPDskLvvwvRx8W66Ajur4B8iyb0

This has inspired me to make a mod where the player can control the carriage, and even command companions to get in the back!
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Post » Mon Jun 18, 2012 10:36 pm

What if in the helgen scene there is just a path for the horse to follow? (just guessing)
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Mon Jun 18, 2012 8:40 pm

I understand there is a path for the horse to follow, my question is rather how is the cart tied to the horse?

I have tried to replicate the original cart as much as possible by using the same objects and tieing the entities together, and somehow the original cart is attached to it and follows it. I have tried everything but my cart will not follow my horse.
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm

Post » Mon Jun 18, 2012 10:38 am

I just want to know which mod caused that meteor to fall out of the sky while you were running the imperials over by that fort....
User avatar
Mistress trades Melissa
 
Posts: 3464
Joined: Mon Jun 19, 2006 9:28 pm

Post » Mon Jun 18, 2012 12:40 pm

That video is epic! :goodjob:
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Mon Jun 18, 2012 8:49 pm

I say this was very impressive as in almost where. Cart is following the horse,
Now the cart need suspensions as in it will almost not bounce at all, just go up and then down,
Now the cart in the start was slow, this cart is going unrealistic fast, first is to increase the weight of it also see if you can decrease the bumping.

I read about an property in the CK who was related to carts and was about horses.
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Mon Jun 18, 2012 8:29 pm

Hmm... I didn't find any direct links between this script and the chargen prisoner carriage, but take a look at the script named "CartAndHorseTether". It looks like a generic script to tie a horse to a carriage, anyways.
User avatar
stevie trent
 
Posts: 3460
Joined: Thu Oct 11, 2007 3:33 pm

Post » Mon Jun 18, 2012 6:18 am

I just want to know which mod caused that meteor to fall out of the sky while you were running the imperials over by that fort....

That would be the Space Core mod from Valve :smile:

-I say this was very impressive as in almost where. Cart is following the horse,
Now the cart need suspensions as in it will almost not bounce at all, just go up and then down,
Now the cart in the start was slow, this cart is going unrealistic fast, first is to increase the weight of it also see if you can decrease the bumping.

I read about an property in the CK who was related to carts and was about horses.
-

Very useful suggestions thank you. I agree increasing weight and lowering speed would make it much more stable, and will look into that.

-Hmm... I didn't find any direct links between this script and the chargen prisoner carriage, but take a look at the script named "CartAndHorseTether". It looks like a generic script to tie a horse to a carriage, anyways.
-

Thats probably exactly what I need, thank you too!

I will try again as soon as I can with that script.
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Mon Jun 18, 2012 5:34 pm

Have a look at quest MQ101, stage 12:


myCart1.TetherToHorse(Alias_CartHorse1.GetActorRef())myCart2.TetherToHorse(Alias_CartHorse2.GetActorRef())
User avatar
Phillip Hamilton
 
Posts: 3457
Joined: Wed Oct 10, 2007 3:07 pm

Post » Mon Jun 18, 2012 5:22 pm

I'm really, really interested in this. Has any progress been made?
User avatar
Nadia Nad
 
Posts: 3391
Joined: Thu Aug 31, 2006 3:17 pm

Post » Mon Jun 18, 2012 11:51 am

Progress certainly has.

The tether scripts worked perfectly, thanks again. Also got the cart to move more realistically by slowing the speed of the horse.

Whats left is alot of complicated scripting which I am not used to, and its taking some time to learn :P.

So far I am having problems activating a container in another cell using the IsSneakingCommand. Debug Messages show, but the container refuses to open.

Heres a snip of my scripting if you have any insight on this issue.

Spoiler

Event OnActivate(ObjectReference akActionRef)

If (akActionRef == Game.GetPlayer())
If Game.GetPlayer().IsSneaking()
Debug.MessageBox("SneakACTCart")
TravelBags.Activate(Game.GetPlayer(), true)

Else
Debug.MessageBox("StandingACTCart")
;TravelBags.Activate(Game.GetPlayer(), true)
EndIf

EndIf
EndEvent


ObjectReference Property TravelBags Auto
User avatar
Dale Johnson
 
Posts: 3352
Joined: Fri Aug 10, 2007 5:24 am

Post » Mon Jun 18, 2012 11:50 am

That was possibly the most entertaining Skyrim video I have yet seen. I will keep checking this thread so that I can download this mod--would love a horse and cart.
User avatar
noa zarfati
 
Posts: 3410
Joined: Sun Apr 15, 2007 5:54 am

Post » Mon Jun 18, 2012 8:52 pm

I'm actually working on a mod which makes the carriages at the cities into "ridable" carriages like in chargen. I should have it up in a few days and will probably be useful to you. Main scripts to look at is CartDriverScript and the CarriageSystemScript.
User avatar
Verity Hurding
 
Posts: 3455
Joined: Sat Jul 22, 2006 1:29 pm

Post » Mon Jun 18, 2012 9:29 pm

That does sound very useful, will have to DL it and take a look thanks :).
User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Post » Mon Jun 18, 2012 6:59 am

Bump for a new problem, any assistance will be appretiated :)
User avatar
Claudia Cook
 
Posts: 3450
Joined: Mon Oct 30, 2006 10:22 am

Post » Mon Jun 18, 2012 8:20 pm

I'm actually working on a mod which makes the carriages at the cities into "ridable" carriages like in chargen. I should have it up in a few days and will probably be useful to you. Main scripts to look at is CartDriverScript and the CarriageSystemScript.
:ohmy: Really? Where would we download just a masterpiece, if it were for download or something?




By the way, OP, love the video. :D Good luck on the mod.
User avatar
Chris Guerin
 
Posts: 3395
Joined: Thu May 10, 2007 2:44 pm

Post » Mon Jun 18, 2012 6:09 pm

Shameless Bump again for new issues.
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Mon Jun 18, 2012 3:23 pm

Same here.
User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am

Post » Mon Jun 18, 2012 2:20 pm

EDIT AGAIN:

Well I got it working, sorta. Using an OnInit:
Spoiler
Scriptname Driveablecartcomp1 extends ReferenceAliasEvent OnInIt()RegisterForUpdate(2)GotoState ("polling")Endeventstate pollingEvent Onupdate()  AttachToCart(Closest)  UnRegisterForUpdate()  GotoState ("active")Endeventendstatestate active;nothingendstatefunction AttachToCart(bool bDoAttach)if bDoAttach  Closest.SetVehicle(DriveableCart1)  Utility.Wait(0.1)  Closest.PlayIdle(CompanionCartIdle)endifendfunctionObjectReference property DriveableCart1 AutoIdle property CompanionCartIdle AutoActor property Closest Auto

Makes Lydia play the animation... everywhere lol. Is there any way to make an OnInit not start on game startup?
User avatar
GLOW...
 
Posts: 3472
Joined: Thu Aug 03, 2006 10:40 am

Post » Mon Jun 18, 2012 6:08 pm

I have been working on something very similar..very very similar to what your doing :P

(damn cant post links... had a youtube video..not as good as yours though...)

My goal is to make a tow-able house like a traders Wagon or like in the video info a Gypsies wagon with hopefully custom wagon models. I wasn't really concerned about loading people in the cart (your video is just killer :P) just more working out how to stabilize the cart then link it to a cell to get the house working. I really wish there was more info on the havoc properties within skyrim but I have managed to get the wagon not to bounce as much. With a full sprint on the horse it bounces as though you were running and my adjustments didn't let it tip much on its side. This was done by modifying some variables in the .nif file, it didn't make a huge change but I thought it was more stable or it appeared to be.

I did manage to get the cart to send me to a defined door but im having trouble getting a door to send the player back to the right location on the cart.(can't change the position of ref's) as well as some issues with a onactivate teleport script. Only other issue with mine is on fast travel mount goes with you, but not cart xD see it zipping through the air sometimes or dragging across the ground to the horse, could be fixed with a script to send the cart aswell but that's where I'm at on mine. You have a much better quality mod going so far then mine, not to mention much more experience with papyrus then I. :(

definitely gonna keep an eye out see what I can..."glean" from the topic xD
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am


Return to V - Skyrim