1.Introduction
Di GUI, kamu hanya bisa menggunakan global variables, yang bisa di set dan digunakan function.
Untuk mendeclare global variable di WE dengan menampilkan opsi variable tekan CTRL+B di trigger editor.
Locals itu berbeda, local hanya bisa di gunakan didalam function yang sudah mendeclare local itu sendiri.
Cara mendeclare local variable “local ”. Local harus di declare(di tulis) pertama kali setelah menulis function.
2.Macam" Variable
1.Local variable
A.Introduction
*Local variable Adalah variable yang dapat di stack namun variable ini hanya dapat di
gunakan untuk 1 function saja tidak dapat lompat dan juga variable ini harus
di null semua kecuali real sama integer.
(ex: local variable_type = variable_name)
*Variable local yang salah
[code]
function CreateEffect takes nothing returns nothing
local unit u
set u = GetTriggerUnit()
endfunction
function RemoveUnit takes nothing returns nothing
call RemoveUnit(u, true)
endfunction[/code]
Mengapa salah? Karena local variable tidak dapat melompat function.
*Perubahan" pada GUI trigger
[code] group is Unit Group in GUI
force is Player Group in GUI
destructable is Destructible in GUI
effect is Special Effect in GUI
location is Point in GUI
rect is Region in GUI[/code]
B.Membuat Local variable
*Untuk membuat local variable kalian harus paham dengan Jass. Local variable
hanya bisa di buat dengan custom script atau trigger yang sudah di convert ke
custom text.
C.Membuat Penyimpanan data
*Data yang kita buat dengan Local variable.
Ex : [code]Events
Player - Player 1 (Red) types a chat message containing - test as An Exact Match
Conditions
Actions
Custom script: local player Chat
Custom script: set Chat = GetTriggerPlayer()[/code]
*Jika membuat Local variable penempatan Local variable harus di paling atas.
2.Global Variable
Adalah variable yang fungsinya sama dengan udg_ / variable GUI hanya letak
perbedaannya pada udg_ kalau GUI variable ada udg_ namun di Jass tidak
(udg_ = User-defined Global).
(ex: globals
variable_type = variable_name
endglobals)
-Macam" Variable
[code]
type event extends handle
type player extends handle
type widget extends handle
type unit extends widget
type destructable extends widget
type item extends widget
type ability extends handle
type buff extends ability
type force extends handle
type group extends handle
type trigger extends handle
type triggercondition extends handle
type triggeraction extends handle
type timer extends handle
type location extends handle
type region extends handle
type rect extends handle
type boolexpr extends handle
type sound extends handle
type conditionfunc extends boolexpr
type filterfunc extends boolexpr
type unitpool extends handle
type itempool extends handle
type race extends handle
type alliancetype extends handle
type racepreference extends handle
type gamestate extends handle
type igamestate extends gamestate
type fgamestate extends gamestate
type playerstate extends handle
type playerscore extends handle
type playergameresult extends handle
type unitstate extends handle
type aidifficulty extends handle
type eventid extends handle
type gameevent extends eventid
type playerevent extends eventid
type playerunitevent extends eventid
type unitevent extends eventid
type limitop extends eventid
type widgetevent extends eventid
type dialogevent extends eventid
type unittype extends handle
type gamespeed extends handle
type gamedifficulty extends handle
type gametype extends handle
type mapflag extends handle
type mapvisibility extends handle
type mapsetting extends handle
type mapdensity extends handle
type mapcontrol extends handle
type playerslotstate extends handle
type volumegroup extends handle
type camerafield extends handle
type camerasetup extends handle
type playercolor extends handle
type placement extends handle
type startlocprio extends handle
type raritycontrol extends handle
type blendmode extends handle
type texmapflags extends handle
type effect extends handle
type effecttype extends handle
type weathereffect extends handle
type terraindeformation extends handle
type fogstate extends handle
type fogmodifier extends handle
type dialog extends handle
type button extends handle
type quest extends handle
type questitem extends handle
type defeatcondition extends handle
type timerdialog extends handle
type leaderboard extends handle
type multiboard extends handle
type multiboarditem extends handle
type trackable extends handle
type gamecache extends handle
type version extends handle
type itemtype extends handle
type texttag extends handle
type attacktype extends handle
type damagetype extends handle
type weapontype extends handle
type soundtype extends handle
type lightning extends handle
type pathingtype extends handle
type image extends handle
type ubersplat extends handle[/code]
▂ ▃ ▅ ▆ █ Baca Juga Artikel █ ▆ ▅ ▃ ▂
Tulisan "[Tutorial] Jass Trigger Part 3" bebas Anda sebarluaskan asal anda menyertakan link asli sumber tulisan
Dengan mengisi email Anda dibawah ini maka anda akan mendapatkan artikel terbaru dari ItsMeFurZy.blogspot.com
0 komentar:
Posting Komentar
Tulislah komentar dengan bijak dan jangan melakukan SPAM karena komentar anda sangat dibutuhkan bagi saya.