Page 1 of 1

Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 8:36 am
by morningstarring
So I've managed to get the Emily to sail but there are a few issues I can't sort out. Sometimes the ship veers off course if anne hits an object on deck or something similar. Anne doesn't stay planted on the deck and the ship will move out from underneath unless you run in the same direction.

Anyone have any tips to keep it sailing on a straight course, moving only along one axis? and is there a way to keep anne stable on deck? attached is a picture of the magnet Tscript.

heres a link to the ship sailing test https://streamable.com/em5okt

Re: Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 2:52 pm
by Rebel
The two most recent scripting for moveable vehicles that I've done recently were the bulldozer and the sky tram in the
prequel level. You can check those out. I'm sure there are more examples that others may have done, but the ones I
directly dealt with are the ones that come immediately to mind.

As far as getting Anne to move along with the vehicle (in your case, a ship), is something I don't know if that's doable.
I worked around that by being able to have Anne butt up against a subobject. You can walk forward in the tram as an
example, but mostly you're counting on Anne either being held in place by the seating going forward, or by the control
assembly on the return trip. IN the case of the bulldozer, Anne is basically hemmed in by the dozer's $objects.

Re: Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 4:14 pm
by machf
I remember both the balloon in the TC level and the tram in The Four Towers sort of required you to hang on to the moving vehicle to avoid falling down or being left behind... friction in Trespasser doesn't seem to be too effective (hence all the problems with stacking boxes, too). My suggestion is that the ship should move while you're holding the ship's wheel on the bridge or something, then as soon as you release it it would start losing speed...

Re: Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 4:26 pm
by morningstarring
Rebel wrote:The two most recent scripting for moveable vehicles that I've done recently were the bulldozer and the sky tram in the
prequel level. You can check those out. I'm sure there are more examples that others may have done, but the ones I
directly dealt with are the ones that come immediately to mind.

As far as getting Anne to move along with the vehicle (in your case, a ship), is something I don't know if that's doable.
I worked around that by being able to have Anne butt up against a subobject. You can walk forward in the tram as an
example, but mostly you're counting on Anne either being held in place by the seating going forward, or by the control
assembly on the return trip. IN the case of the bulldozer, Anne is basically hemmed in by the dozer's $objects.
thanks. I'll check those levels out. I have an object attached to the ship for anne to be pushed along by, I had to give it a damage value of -1.00 to keep it from randomly killing her. however, when she interacts with the object it seems to sometimes cause the ship to veer off track. I'll look into those levels and try to tweak the $objects so they only act on anne and not the ship if it's possible.

Re: Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 4:35 pm
by morningstarring
machf wrote:I remember both the balloon in the TC level and the tram in The Four Towers sort of required you to hang on to the moving vehicle to avoid falling down or being left behind... friction in Trespasser doesn't seem to be too effective (hence all the problems with stacking boxes, too). My suggestion is that the ship should move while you're holding the ship's wheel on the bridge or something, then as soon as you release it it would start losing speed...
I'll give it a steering wheel or something as a trigger later on. I still need to figure out how to script the mechanics of anne touching an object to activate the trigger or similar method. Are the sphere/cube triggers such as a "CLocationTrigger" able to move or be attached by magnets? I tried a few other methods to make them move but it cause the level not to load.

Re: Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 4:47 pm
by Draconisaurus
I imagine I tried to attach a CLocationTrigger to an object via CMagnet, back in the day. Tres doesn't seem to let triggers move. When CCollisionTriggers work right, they can be used instead... Finding what does and doesn't work in a CCollisionTrigger really is a personal discovery mission.

Re: Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 5:17 pm
by tatu
First off I must say, by the advanced scripting you are trying, you are already among the top few modders who aim for more advanced mods! If anything it is super rare and for most if not all of us, it took years even to try stuff like this. :)
I still need to figure out how to script the mechanics of anne touching an object to activate the trigger or similar method.
I'd say it is similar to the elevator, but basically it is Anne's hand that can only activate it, like her hand (her physic mesh).

Suggestion/question: Would it be possible to move the ship (in a straight line) if you attach a magnet onto an invisible rail that is the path? I remember those "free" magnets always had issues of floating everywhere, probably cause they were never really used and never fixed.

Re: Sailing on the Emily. Kinda working. need input

Posted: Wed Dec 16, 2020 5:46 pm
by machf
morningstarring wrote: I'll give it a steering wheel or something as a trigger later on. I still need to figure out how to script the mechanics of anne touching an object to activate the trigger or similar method. Are the sphere/cube triggers such as a "CLocationTrigger" able to move or be attached by magnets? I tried a few other methods to make them move but it cause the level not to load.
Instead of a location trigger, I'd use the CObjectTrigger, with the condition being evaluated being either UseObject or PickUpObject/PutDownObject. (UseObject means you're pressing the key for "firing" or "swinging" the object you're holding in your hand at the time)
The ball turret in TC Isle originally used PickUpObject/PutDownObject, I later modified it to use UseObject instead...

Re: Sailing on the Emily. Kinda working. need input

Posted: Thu Dec 17, 2020 5:38 am
by morningstarring
tatu wrote:First off I must say, by the advanced scripting you are trying, you are already among the top few modders who aim for more advanced mods! If anything it is super rare and for most if not all of us, it took years even to try stuff like this. :)
thanks! i'm flattered.

Re: Sailing on the Emily. Kinda working. need input

Posted: Thu Dec 17, 2020 5:53 am
by morningstarring
latest progress https://streamable.com/8kg4q6

I'm having most success with Ccollision triggers. I can't get CObject triggers to function yet. I need to figure out a better way to keep anne moving with the ship and change the objects that activate the trigger. I also tested out a very rudimentary stopping mechanism lol. I think I might have something detach from the boat and land on something that will activate a collision trigger. the ship seems so sail straighter when the collision element object isn't in constant motion.

I think I may change my last level a little bit and have the ship at the end move to an entirely new area instead of ending the level.

Re: Sailing on the Emily. Kinda working. need input

Posted: Thu Dec 17, 2020 7:48 am
by tatu
I'd say try using a magnet that is attached to the underside of the boat, and to an "invisible" railing below it. So in a way it would act like a slide-door. Not sure if that could work?

Re: Sailing on the Emily. Kinda working. need input

Posted: Thu Dec 17, 2020 8:52 pm
by TheIdiot
Could a similar trigger be applied to Anne while she's on the moving ship to propel her at the same speed as the boat?

Re: Sailing on the Emily. Kinda working. need input

Posted: Fri Dec 18, 2020 2:37 am
by morningstarring
tatu wrote:I'd say try using a magnet that is attached to the underside of the boat, and to an "invisible" railing below it. So in a way it would act like a slide-door. Not sure if that could work?
if it could work I'd need to find a long skinny object to attach it to. I want it to travel a fair distance to a new local. however, I don't know if magnets can slide or move along a specific axis. I could try to see if the "XTFree = true" script can act on a magnet. maybe if master and slave objects are assigned?

Re: Sailing on the Emily. Kinda working. need input

Posted: Fri Dec 18, 2020 2:44 am
by Draconisaurus
I might have a closer look if my head were feeling better. But keep us posted and we can brainstorm.

...Hmmm oh. On a laptop I lost, I had gotten some ways in a level with a moving Humvee that Anne was riding. It really worked! The Humvee occasionally started rotating slowly in odd directions, but the level was a constant (slow) motion path for the vehicle, around various bends, so I solved the issue (albeit with a bit wacky-seeming result) by having the Humvee be "course corrected" at each bend, at which point you were able to get back on without much issue. Raptors were by the way, and defended against as you went. A fixed-texture InGen helicopter... what are those things called? Chinook, was at the end, waiting to pick you up.

Re: Sailing on the Emily. Kinda working. need input

Posted: Fri Dec 18, 2020 7:35 am
by tatu
morningstarring wrote:
tatu wrote:I'd say try using a magnet that is attached to the underside of the boat, and to an "invisible" railing below it. So in a way it would act like a slide-door. Not sure if that could work?
if it could work I'd need to find a long skinny object to attach it to. I want it to travel a fair distance to a new local. however, I don't know if magnets can slide or move along a specific axis. I could try to see if the "XTFree = true" script can act on a magnet. maybe if master and slave objects are assigned?
You could otherwise look into the TC level (TresCom) and check how to use the ActionType = 26 "CScriptedAnimationAction" function. They used it on the hot air balloon.
https://www.trescom.org/files/docs/tscr ... tionAction