Skip to content

All Comments

13581 to 13600 of 19729

Filter comments

The Official Scripting Ask Thread
Scripting

While you set the delay time in line 59 you don't query it somewhere? Actually wrapping the instructions inside the triggerRested branch in the isTriggeredRested() method with a launchDelayTimer == 0 condition should do the job already assuming there would be no other logical error. But another problem is that you set up the timer when the train leaves the trigger instead when it enters it and where the triggering event is started by setting triggerRested to true.

View comment
The Official Scripting Ask Thread
Scripting

Hi folks, still trying to work on a script that delays an animation occurring by a set amount of time (e.g. 2 seconds).

My edited version of bestdani's code is currently:

package scoanimation;

import com.nolimitscoaster.SceneObject;
import com.nolimitscoaster.TrackTrigger;
import com.nolimitscoaster.TrackTriggerListener;
import com.nolimitscoaster.Train;
import nlvm.math3d.Vector3f;

class TrackTriggeredScoAnimationDelay extends ScoAnimation implements TrackTriggerListener {
    private float moveBackDelay;
    private bool triggerRested;
    private float moveBackDelayTimer;
    private float launchDelay = 2;
    private float launchDelayTimer;

    TrackTriggeredScoAnimationDelay(
            SceneObject animatedSco,
            Vector3f transformedTranslation, Vector3f transformedRotation, Vector3f transformedScale,
            float movingToTransformedDuration, float movingToRestedDuration, TrackTrigger trackTrigger,
            float moveBackDelay) {
        super(animatedSco, transformedTranslation, transformedRotation, transformedScale, movingToTransformedDuration,
                movingToRestedDuration);
        this.moveBackDelay = moveBackDelay;
        moveBackDelayTimer = moveBackDelay;
        trackTrigger.addTrackTriggerListener(this);
    }

    void onNextFrame(float tick) {
        if (moveBackDelayTimer > 0) {
            moveBackDelayTimer -= tick;
            if (moveBackDelayTimer < 0) moveBackDelayTimer = 0;
        }
        if (launchDelayTimer > 0) {
            launchDelayTimer -= tick;
            if (launchDelayTimer < 0) launchDelayTimer = 0;
        }
        super.onNextFrame(tick);
    }

    bool isTriggeredRested() {
        if (triggerRested) {
            triggerRested = false;
            moveBackDelayTimer = moveBackDelay;
            return true;
        } else {
            return false;
        }
    }

    bool isTriggeredTransformed() {
        return moveBackDelayTimer == 0;
    }

    public void onTrainEntering(TrackTrigger trigger, Train train) {
        triggerRested = true;
    }

    public void onTrainLeaving(TrackTrigger trigger, Train train) {
        launchDelayTimer = launchDelay;
        triggerRested = false;
    }
}

Line 59 is my attempt to try and get the delay working, but I think I'm doing it completely wrong. Currently there's no syntax errors but the delay I'm trying to achieve doesn't happen. If anyone requires the original code by bestdani I'm editing, I'll post it. Thanks!

View comment
The Official WTF Thread
General

I'm guessing it is after the ride closed as well. The train derails on the last curve, which suggests they were taking it apart. Also, that fire couldn't have been good for the track and structure.

View comment
Womp's thread of stuff
NoLimits Coaster

@ Asianguruu: I would've provided some image updates during construction, but i couldn't. Because someone else was making it for me. And they only recently finished it and sent it back to me. So, you will see a few more pics from now on. It's mainly scenery work that i'll be doing. Need to re-do my station building, as my original design now doesn't fit where the station section is.
Track & support colours may be subject to change.

Thanks for the comments guys.

View comment
The Official Scripting Ask Thread
Scripting

Hello,
download worked, thank you, perhaps i try it later. For your example code: where do i use this code? In the coaster? In the object? Somewhere other place? And for the code to animate the door: are the coodinates relative to placement of object, if the door is positioned in closed position, is the first translation/rotation (0,0,0)? Or must i use absolute coordinates? is the variable tick starting at 0.0 for the time when trigger is entered? Now i am searching for an example park in NoLimits2 that uses triggered animation, i hope i can find one, perhaps above questions will be answered. Or does one of the parks in this forum has triggered animations?

I am still searching for the posting showing a train (maybe a wing coaster or a wide drop coaster) leaving a station and two gates on the sides are opening to let train pass leaving the station. It was a animated gif in posting, but i do not know any keywords to use for search function. Perhaps this is also a park that can be downloaded here.

I have read sometimes there are so many examples given with NoLimits, but there are only some example parks (i have not found any park with animated objects) and a lot of script examples. I have found only one in the help for an unconditional moving object, but not a triggered one. In this link
https://www.coastercrazy.com/forums/how-to-open-a-door-script-t32370.html
there is a link to a youtube video with an example for animated doors, it should be an example of NoLimits, but i cannot find it in my installation. Have i missed something at installation of NoLimits? Or where are all the examples for scripts? The park file of this youtube video will help. I have found another animation from user thimok, the youtube video shows a park named "Baron 1898", but there is no download of this park here. And i do not want download all parks just to find one with animated objects...

Best regards

View comment
The Official Scripting Ask Thread
Scripting

I'm hoping someone could help me out, I'm trying to find a way to do a Multi-move Blocks script, sort of how B&M coasters start moving another train just slightly early to increase capacity, and I'm also looking for I guess I could call it a script where the feeders change speed base on the where the train is.

For the second script, what I mean is like how feeders will move at a fast speed on B&M's, and then when the train gets to a certain point they slow down (Which helps when it's raining)

View comment
13581 to 13600 of 19729