Do You Need Scripting Help?

Post » Thu Jun 02, 2011 1:17 am

While I am waiting for my internet to come back on.. so I can order a new computer... I have been making scripts and learning as much as I can (with a lot of help from other people).

So What I am asking is: Does anyone have a problem with scripts that I can try to fix? It would give me a lot more experience and I have lots of free time so it would be great if you could post with your scripting trouble (or PM me).

Thank you and I hope to see some scripts for me to work on!

PS: I should mention that if it requires a script extender in any way I won't be able to do it, not only do I not have any of them but even if I did get one I wouldn't know how to use them.
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Post » Thu Jun 02, 2011 5:24 am

eh, simple script i could use to make one light switch with another light? (ie: i have to plants, one glows one doesnt, and i only want the glowing one to appear at night, and the none-glowing one appears during the day.)

keen?
User avatar
benjamin corsini
 
Posts: 3411
Joined: Tue Jul 31, 2007 11:32 pm

Post » Thu Jun 02, 2011 5:03 am

Sure thing, I'll begin work immediately (shouldn't take me to long)
User avatar
tannis
 
Posts: 3446
Joined: Sat Dec 09, 2006 11:21 pm

Post » Thu Jun 02, 2011 3:54 am

cool cool :)
User avatar
Ice Fire
 
Posts: 3394
Joined: Fri Nov 16, 2007 3:27 am

Post » Wed Jun 01, 2011 9:14 pm

I can try and simplify it if you want (will take me quite a bit longer though...)

Basically with this script you need to have the Unlit plant and the Lit plant placed in the CS in the same spot this means manually move them till it looks like one plant (simply for a realistic look so the plants don't seem to be jumping around when they switch).

Be sure to click References Persist on both of the plants!!!!

Then attach this script to a surrounding object that the player can't pick up.. maybe a rock? Or a ring placed under ground? Something like that. The object you attach the script to must be in the same cell as the plants.

This script will effect ALL of the two plants in the same cell as the item. This means if you place 16 pairs of Day and Night plants in the cell all of the pairs will rotate between the glowing one and the non glowing one every day/night.

Enjoy, comments, concerns, and constructive criticism all welcome and appreciated.

Tested and woks at full functionality if directions above are followed.
Morrowind Only required.
Begin plant_lightshort DayTimeshort NightTimeshort DoOnceshort DoOnce2float timerif ( CellChanged == 1 )	set timer to ( timer + GetSecondsPassed )endifif ( timer >= 0.01 )	set DayTime to 0	set NightTime to 0	set DoOnce to 0	set DoOnce2 to 0	set timer to 0endifif ( DayTime == 2 )	if ( DoOnce == 0 )		"Night_Plant_ID"-> Disable		"Day_Plant_ID"-> Enable		set DayTime to 1		set DoOnce2 to 0		set DoOnce to 1	endifendifif ( NightTime == 2 )	if ( DoOnce2 == 0 )		"Night_Plant_ID"-> Enable		"Day_Plant_ID"-> Disable		set NightTime to 1		set DoOnce to 0		set DoOnce2 to 1	endifendifif ( DayTime == 0 )	if ( GameHour > 7 )		if ( GameHour < 20 )			set NightTime to 0			set DayTime to 2		endif	endifendifif ( NightTime == 0 )	if ( GameHour >= 20 )		if ( GameHour <= 23 )			set DayTime to 0			set NightTime to 2		endif	endifendifif ( NightTime == 0 )	if ( GameHour <= 7 )		set DayTime to 0		set NightTime to 2	endifendifend plant_light

User avatar
JeSsy ArEllano
 
Posts: 3369
Joined: Fri Oct 20, 2006 10:51 am

Post » Thu Jun 02, 2011 5:23 am

ok, cool, but there might be clipping with the 2 plants on the same spot..

thanks, added it to the plant now.

added to teh credits ;)
User avatar
Clea Jamerson
 
Posts: 3376
Joined: Tue Jun 20, 2006 3:23 pm

Post » Thu Jun 02, 2011 7:00 am

There won't be any clipping because there will only be one plant visible at a time. Also remember don't add the script to either of the plants, you must add it to a separate object such as a rock or an object underground.

Glad you like it and thank you for the credits!
User avatar
Kelsey Anna Farley
 
Posts: 3433
Joined: Fri Jun 30, 2006 10:33 pm

Post » Thu Jun 02, 2011 5:43 am

not a problem, i'll have some screens in a week (max+), and include some of the lights :D
User avatar
Ruben Bernal
 
Posts: 3364
Joined: Sun Nov 18, 2007 5:58 pm

Post » Wed Jun 01, 2011 8:50 pm

Can't wait! :)

Anyone else need Morrowind scripting help, troubleshooting, etc.?
User avatar
Brandi Norton
 
Posts: 3334
Joined: Fri Feb 09, 2007 9:24 pm

Post » Thu Jun 02, 2011 12:42 am

There won't be any clipping because there will only be one plant visible at a time. Also remember don't add the script to either of the plants, you must add it to a separate object such as a rock or an object underground.

Glad you like it and thank you for the credits!


I think it's always better to attach the script to the item(s) that it's actually affecting. For instance in this case it would be better to have a script on each plant that uses "Enable" / "Disable" whenever certain conditions are met.
User avatar
Danger Mouse
 
Posts: 3393
Joined: Sat Oct 07, 2006 9:55 am


Return to III - Morrowind