View difference between Paste ID: CrwjQ3cs and MPNMcBtU
SHOW: | | - or go back to the newest paste.
1-
// © by Giere Drachios. This is not for resale or transfer. Leave this note intact. If this is Transfered or resold without permission, you will be reported to LL. I leave my scripts open to editing/modding to allow full customization and allow learning scripters a chance to see how the script works. Please do not betray my trust. Enjoy! [I take absolutely no responsibility for how you use this script.]
1+
// Edited by Interference. Bugger Giere Drachios.
2
3-
// Do not leave this mod or copy in an object you intend to give away or sell! \\
3+
4
5
float moveMPerStep = 0.00005;	// Move x meters per step
6
float changeStage = 0.003;		// Increment speed to quicken then slow move
7-
float moveMPerStep = 0.00005; // Move x meters per step
7+
integer steps = 50;				// Number of steps per cycle
8-
float changeStage = 0.003; // Increment speed to quicken then slow move
8+
9-
integer steps = 50; // Number of steps per cycle
9+
10-
float topWait = 0.0; // Wait duration at top position till descending
10+
11-
float botWait = 0.0; // Wait duration at bottom position before ascending
11+
12
13-
integer top;
13+
// Default state
14
default
15
{
16
	// Fires when we rez
17
    on_rez(integer start)
18
    {
19
        llResetScript();		// Just resets the script on rez, forcing state_entry to run again
20
    }
21
    
22-
        llResetScript();
22+
	// Fires when we enter this state or the script is reset
23
    state_entry()
24
    {
25
		// Set some variables
26
        count = 0;
27-
        top = FALSE;
27+
28
		// Start this object rotating
29-
        llSetTimerEvent(0.01);
29+
		llTargetOmega(<0,0,3>,PI,100);
30
31
		// Set the timer event to trigger every 0.01 seconds
32
		llSetTimerEvent(0.01);
33
34
		// Sleep for 0.4 seconds then play a sound
35
		llSleep(0.4);
36
        llPlaySound(llGetInventoryName(INVENTORY_SOUND,0), 1.2);
37
    }
38-
            if( top )
38+
39
	// Timer event. Fires whenever llSetTimerEvent tells it to
40-
                if( count < steps/2)
40+
41-
                {
41+
42-
                    moveMPerStep += changeStage;
42+
43-
                }
43+
44-
                else
44+
45-
                {
45+
46-
                    moveMPerStep -= changeStage;
46+
            if( count < steps/2)
47-
                }
47+
48-
                pos = llGetPos(); 
48+
            	moveMPerStep += changeStage;
49-
                pos.z -= moveMPerStep;
49+
50-
                llSetRegionPos(pos);
50+
51-
                count ++;
51+
52
            {
53
	            moveMPerStep -= changeStage;
54
            }
55-
                if( count < steps/2)
55+
56-
                {
56+
            pos = llGetPos();
57-
                    moveMPerStep += changeStage;
57+
            pos.z += moveMPerStep;
58-
                }
58+
            llSetRegionPos(pos);
59-
                else
59+
            count ++;
60-
                {
60+
61-
                    moveMPerStep -= changeStage;
61+
	
62-
                }
62+
		// Check if we're done climbing. If we are, self delete!
63-
                pos = llGetPos();
63+
64-
                pos.z += moveMPerStep;
64+
65-
                llSetRegionPos(pos);
65+
			llDie();
66-
                count ++;
66+
67
    }
68
}