I need some tutorials.

Arcana

New member
Joined
Dec 3, 2008
Messages
28
:help I need some scripting tutorials. I can't get to the Wiki so that's out of the question. Since I can come here the most ideal thing would be for Daxter to finishes his tutorials in the script library, if he has the time. If the aren't any good tutorials that I can get to could somebody put some scripts together for me? I'll put the map, all the scripts I want in it, and a note saying where things (like the invincable man) should go. Thank you. 
 
What is it you need help with. Can you use the compiler?

If you are using the scripts in the Script Library, most only need simple changes to get them to function.
 
See if you can get to this page. It's got instructions on how to use the compiler and how to put scripts together.
 
It's not the browser...it's the uh...parental controls. (Cyber school computer.  :( )
 
Thank you so much. Now I can finish my map an hopefully upload it after improving the textures and edges of this map.  :D
 
Sorry about the double-post. Don't know if it's ok here or not. I'm trying to get the Invincible man script to work but I'm not sure how to put in the coordinates. Do I put it in like this, x: 1234, y:1234, z:1234, or some other way? (Note: not the actual coordinates) I'll be asking quite a few question because I'm new at this and the Wiki didn't seem to explain it very well...  :sorry
 
Yeah co-ordinates are 4 digits each, but can be 1, 2 or 3 digits aswell, so you can have 1, 12, 123, 1234. The Y co-ordinate is the altitude, so if you don't want a specific altitude to your object and just want it to be land-height, then use X-Z co-ordinates and leave the middle one out.  {1234, 1234} for example, instead of {1234,1234,1234}.
 
No letters specifying X, Y, or Z? Just the numbers, right? I also don't know if anything else in the invincible man script needs changed or not...
The script worked fine before I added it but when I did the load screen wouldn't go away.
 
The coordinates for that script are passed as a parameter when the script is called in the main file

Code:
run background script ImmortalManScript(marker at {1482.64,1831.37})
 
I just can't it get it to work. The load screen goes down now but the man isn't where he should be. Nor does the unlocker/research script work. And the villagers just go at stay at the town center. Is villager activity done with scripts? Also if I attach the scripts in a zip can somebody look at it for me? Thank for your help.
 
Can you please post the code you're using?

For the villagers hiding under ther town ventre. You need to set the Nav Ribbon. This defines where they can and can't go.

It's the "N" in the top bar of the editor. It's a bit funky to use untill you get used to it. There should be a document on it in the Landscape Editor folder
 
I set the nav ribbon when I made the map. And here's the code.
Code:
define script NewScript
define script ImmortalManScript
define script ResearchStandardBuildings

run script MainScript
begin script MainScript
start
	disable load screen
	set fade in time 1

end script MainScript

begin script NewScript

oTown = get town with id 0
oPen = get building ABODE_NUMBER_CREATURE_PEN in oTown min built 1.0
oCreature = create SCRIPT_OBJECT_TYPE_CREATURE CREATURE_TYPE_LION at {oPen}
start
	set player 0 creature to oCreature
	release oCreature

end script NewScript

begin script ImmortalManScript

oMan = 0
RNumber = 0
Held = 0
Chk = 0
oDis = 0
oStart = 0

start

oMan = create SCRIPT_OBJECT_TYPE_VILLAGER VILLAGER_INFO_NORSE_LEADER_MALE at {1317,13.56,1375}
enable oMan indestructible
disable oMan hurt by fire
enable oMan physics tracking
oStart = create influence on oMan radius 5

begin loop
	oDis = get distance from camera position to {oMan}
	if oDis <= 50
			begin cinema
				move camera focus to {oMan} time 1
				make evil spirit appear
				wait 1 seconds
				make evil spirit point to oMan
				say "BW2T_SCRIPT_04FINAL_THROWBLOKE_340"
				wait 3 seconds
				stop evil spirit pointing
				wait 2 seconds
				send evil spirit home
			end cinema
			oDis = 1
	end if
	until oDis == 1
end loop

begin loop
Chk = 0
clear oMan hit land
//if oMan left clicked or oMan right clicked
if oMan == get object held
	RNumber = number from 1 to 7
		if RNumber == 1
		begin dialogue
			say "BW2T_SCRIPT_08FINAL_CHALLENGE_THROW_BLOKE2_100"
		end dialogue
		elsif RNumber == 2
		begin dialogue
			say "BW2T_SCRIPT_08FINAL_CHALLENGE_THROW_BLOKE2_90"
		end dialogue
		elsif RNumber == 3
		begin dialogue
			say "BW2T_SCRIPT_03FINAL_CHALLENGE_THROWBLOKE_09"
		end dialogue
		elsif RNumber == 4
		begin dialogue
			say "BW2T_SCRIPT_03FINAL_CHALLENGE_THROWBLOKE_10"
		end dialogue
		elsif RNumber == 5
		begin dialogue
			say "BW2T_SCRIPT_04FINAL_THROWBLOKE_INHAND_10"
		end dialogue
		elsif RNumber == 6
		begin dialogue
			say "BW2T_SCRIPT_04FINAL_THROWBLOKE_INHAND_60"
		end dialogue
		elsif RNumber == 7
		begin dialogue
			say "BW2T_SCRIPT_04FINAL_THROWBLOKE_INHAND_50"
		end dialogue
		end if
	
	wait until bindable action BINDABLE_ACTION_TYPE_ACTION performed
	Held = 0
	begin loop
		Held = get object held
		if Held not exists
			wait 3 seconds
			Chk = 0
			begin loop
				oStart = marker at hand position
				if oMan hit land
					begin cinema
					wait 1 seconds
					move camera focus to {oMan} time 1
					move camera position to {oMan}+{20,15,0} time 2
					wait until camera ready
					Chk = get distance from {oStart} to {oMan}
					RNumber = number from 1 to 18
					if RNumber == 1
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_10"
					elsif RNumber == 2
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_20"
					elsif RNumber == 3
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_30"
					elsif RNumber == 4
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_40"
					elsif RNumber == 5
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_50"
					elsif RNumber == 6
						say "BW2T_SCRIPT_03FINAL_CHALLENGE_THROWBLOKE_05"
					elsif RNumber == 7
						say "BW2T_SCRIPT_03FINAL_CHALLENGE_THROWBLOKE_06"
					elsif RNumber == 8
						say "BW2T_SCRIPT_03FINAL_CHALLENGE_THROWBLOKE_07"
					elsif RNumber == 9
						say "BW2T_SCRIPT_08FINAL_CHALLENGE_THROW_BLOKE2_30"
					elsif RNumber == 10
						say "BW2T_SCRIPT_08FINAL_CHALLENGE_THROW_BLOKE2_40"
					elsif RNumber == 11
						say "BW2T_SCRIPT_08FINAL_CHALLENGE_THROW_BLOKE2_50"
					elsif RNumber == 12
						say "BW2T_SCRIPT_08FINAL_CHALLENGE_THROW_BLOKE2_60"
					elsif RNumber == 13
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_BEINGTHROWN_80"
					elsif RNumber == 14
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_BEINGTHROWN_90"
					elsif RNumber == 15
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_BEINGTHROWN_140"
					elsif RNumber == 16
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_BEINGTHROWN_160"
					elsif RNumber == 17
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_BEINGTHROWN_240"
					else
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_BEINGTHROWN_210"
					end if
					clear oMan hit land
					increment tribute by Chk*Chk/2
					wait 5 seconds
					Chk++
					end cinema
				else
					begin dialogue
						say "BW2T_SCRIPT_04FINAL_THROWBLOKE_BEINGTHROWN_110"
					end dialogue
					Chk++
				end if
				until Chk != 0
			end loop
			if oMan is drowning
				begin dialogue
					say "BW2T_SCRIPT_04FINAL_THROWBLOKE_160"
				end dialogue
				Chk++
			end if
		end if
	until Chk != 0
	end loop
end if
end loop

end script ImmortalManScript

begin script ResearchStandardBuildings
start
set research ARTEFACT_ABODE_NUMBER_A available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_B available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_C available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_D available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_E available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_SKYSCRAPER available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_ALTAR available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_STORAGE_PIT available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_CRECHE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_SHRINE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_TEMPLE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_PUB available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_TOWN_CENTRE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_CREATURE_PEN available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_FIELD available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_MELEE_ARMOURY available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_RANGED_ARMOURY available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_WORKSHOP available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_STUDY available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_UNIVERSITY available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_PRISON available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_SMELTER available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_GRANARY available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_LUMBERMILL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_MARKET_POT available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_MARKET_STATUE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_MARKET_PLANT available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_AMPITHEATRE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_GRAVEYARD available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_OLD_PERSONS_HOME available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_BATHHOUSE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_WALLTOWER_TECH0 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_WALLTOWER_TECH1 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_GATEHOUSE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_ABODE_NUMBER_GATEHOUSE_F available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EPIC_WONDER_NUMBER_HURRICANE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EPIC_WONDER_NUMBER_EARTHQUAKE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EPIC_WONDER_NUMBER_VOLCANO available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EPIC_WONDER_NUMBER_SIREN available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_LIFE_HEAL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_LIFE_LIFE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_DEATH_DECAY available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_DEATH_DEATH available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_FIRE_FIRE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_FIRE_LAVA available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_EARTH_TREMOR available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_EARTH_METEOR available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_AIR_WIND available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_AIR_TEMPEST available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_WATER_RAIN available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_MAGIC_TYPE_WATER_STORM available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_MAGIC_TYPE_HEAL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_MAGIC_TYPE_WATER available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_MAGIC_TYPE_FIREBALL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_MAGIC_TYPE_LIGHTNING available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_TOY_GOOD available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_TOY_NEUTRAL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_TOY_EVIL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_BUILDER_1 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_BUILDER_2 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_BUILDER_3 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_BUILDER_4 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_GATHERER_1 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_GATHERER_2 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_GATHERER_3 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_GATHERER_4 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_SOLDIER_1 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_SOLDIER_2 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_SOLDIER_3 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_SOLDIER_4  available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_ENTERTAINER_1 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_ENTERTAINER_2 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_ENTERTAINER_3 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_CREATURE_ROLE_ENTERTAINER_4 available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_FERTILITY_STATUE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_FOUNTAIN available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_STREETLAMP available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_TORTURE_PIT available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_COLUMN available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_GARDEN available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_WELL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_SPIKE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_EMBELLISHMENT_INFO_GREEK_MIRACLE_ENHANCER available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_HAND_MULTIPICKUP available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_HAND_FISTING available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_HAND_GESTURES available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_AGE_OF_GODS available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_BARREN_SEAS available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_FATE_OF_THE_EGYPTIANS available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_FRAGMENT available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_GODLESS_MIRACLES available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_IMMORTAL available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_MISSIONARIES available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_ORIGIN_OF_CREATURES available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_PARCHMENT available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_POWER_OF_THE_AZTECS available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_GREEKS available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_JAPANESE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_NORSE available to RESEARCH_AVAILABILITY_RESEARCHED
set research ARTEFACT_TOME_PROPHECY available to RESEARCH_AVAILABILITY_RESEARCHED

end script ResearchStandardBuildings
 
:sorry I couldn't edit my last post. I checked the map in the editor and the nav ribbon is gone. I'm going to have to redo that...going to take a while.  :cmad
 
You need to run the other scripts from the main script.

Code:
begin script MainScript
start
	run script NewScript
	run script ResearchStandardBuildings
	run background script ImmortalManScript	
	disable load screen
	set fade in time 1

end script MainScript

The ImmortalManScript is run as a background script since it needs to run continually. The other two need to run only once.
 
Oh.... Also, the imortal guy needs to be run as a background script?[br][br]Added: [time]1253061283[/time]I did that and it crashed the game...
 
Back
Top