Thursday, 2018-06-21, 0:18 AM Welcome Pengunjung


Indonesian Modding

Main | Sign Up | Login | RSS
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Forum moderator: Rheiko  
Forum » Dunia Modding Warcraft III » Warcraft III Tutorial » Cara mudah membuat MUI Spell
Cara mudah membuat MUI Spell
SecondHandDate: Saturday, 2013-11-09, 6:49 PM | Message # 1
Indomodder Super Legendaris
Group: Moderator Resources
Messages: 19
Awards: 0
Reputation: 2
Status: Offline
Apa itu index?
diketahui sebuah variable bernama "a[1]". Bilangan "1" adalah yang dimaksud dengan index.

Langkah-langkah:
1. Saya langsung masuk ke bagian triggering. Pertama tentukan dulu variabel2 yang berhubungan dengan spell yang anda buat. Misal "caster, target, damage, dll."
Contoh:
Code
Cast Event
          Events
              Unit - A unit Starts the effect of an ability
          Conditions
              (Ability being cast) Equal to TempAbility       
          Actions
              Set TempIndexMax = (TempIndexMax + 1)                    // IndexMax adalah nilai index tertinggi yang saat ini akan digunakan
              Set TempIndexBoolean [TempIndexMax]= True                    // Tandai index tersebut karena akan kita gunakan. True = sedang digunakan, False = nganggur
              Set TempCaster [TempIndexMax]= (Triggering Unit)
              Set TempTarget [TempIndexMax]= (Target of ability being cast)
              Set TempDamage [TempIndexMax]= 100.00
              Unit - Turn collision for TempCaster [TempIndexMax]Off
              Trigger - Turn on Loop <gen>                    // Idupin loopnya


2. Kemudian kita buat "looping trigger" nya
Code
Loop
          Events
              Time - Every 0.03 seconds of game time
          Conditions
          Actions
              For each (Integer TempLoop) from 1 to TempIndexMax, do (Actions)
                  Loop - Actions
                      If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                    TempIndexBoolean [TempLoop]Equal to True                    // Kalau index tersebut ada "isi"nya maka akan diproses
                          Then - Actions
                    Set TempPoint[1] = Position of (TempCaster[TempLoop])
                    Set TempPoint[2] = TempPoint[2] offset by 15.00 facing (Facing of TempCaster[TempLoop])
                    Set TempPoint[3] = Position of (TempTarget[TempLoop])
                    Move TempCaster [TempLoop]to TempPoint[2] facing TempPoint[3]
                    Set TempGroup = Unit within 100.00 from TempPoint[2] matching (Matching unit) equal to TempTarget
                    [TempLoop]If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                         Number of units in TempGroup greater than 0
                        Then - Actions
                         Unit - Cause TempCaster [TempLoop]to damage TempCaster[TempLoop], dealing TempDamage [TempLoop]damage of attack type Spells and damage type Normal
                         Set TempIndexBoolean = False                    // Jika sudah mengenai target maka caster tidak akan diproses lagi
                        Else - Actions
                    Custom Script: call RemoveLocation(udg_TempPoint[1])
                    Custom Script: call RemoveLocation(udg_TempPoint[2])
                    Custom Script: call RemoveLocation(udg_TempPoint[3])
                    Custom Script: call DestroyGroup(udg_TempGroup)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                         TempLoop Not equal to TempIndexMax
                        Then - Actions
                         Set TempIndexBoolean [TempLoop]= True
                         Set TempDamage [TempLoop]= TempDamage
                         [TempIndexMax]Set TempDamageSource [TempLoop]= TempDamageSource
                         [TempIndexMax]Set TempDamageTarget [TempLoop]= TempDamageTarget
                         [TempIndexMax]Set TempDelay [TempLoop]= TempDelay
                         [TempIndexMax]Set TempDelayTimer [TempLoop]= TempDelayTimer
                         [TempIndexMax]Set TempDurationTimer [TempLoop]= TempDurationTimer
                         [TempIndexMax]Set TempIndexBoolean [TempIndexMax]= False
                        Else - Actions
                    Set TempIndexMax = (TempIndexMax - 1)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                         TempIndexMax Equal to 0
                        Then - Actions
                         Trigger - Turn off (This trigger)
                        Else - Actions


Silahkan mencoba smile Maaf jika ada kesalahan karena kode diatas tidak dibuat langsung di Trigger Editor

Grr susah amat ngatur code nya, mending langsung lihat contoh ny aja dah :3
Download Contoh


Message edited by SecondHand - Saturday, 2013-11-09, 9:42 PM
 
SecondHandDate: Saturday, 2013-11-09, 8:58 PM | Message # 2
Indomodder Super Legendaris
Group: Moderator Resources
Messages: 19
Awards: 0
Reputation: 2
Status: Offline
kalau ada yang kurang dimengerti bs tanya ke saya smile

Maaf, ada kesalahan di looping. Seharusnya "LoopBoolean[indexmax] = false" di letakan di atas "indexmax=indexmax-1"


Message edited by SecondHand - Saturday, 2013-11-09, 10:05 PM
 
RheikoDate: Monday, 2013-11-11, 12:59 PM | Message # 3
Co-Admin
Group: Administrators
Messages: 42
Awards: 2
Reputation: 12
Status: Offline
lumayan, tapi aku sarankan untuk menggunakan Dynamix Indexing dari PnF - Link
jelaskan apa itu MUI agar pemula lebih paham
demikian juga variable, jangan hanya memberi penjelasan index
selain itu sudah cukup bagus walaupun sederhana
 
SecondHandDate: Monday, 2013-11-11, 3:47 PM | Message # 4
Indomodder Super Legendaris
Group: Moderator Resources
Messages: 19
Awards: 0
Reputation: 2
Status: Offline
wah, bener jg, punya PnF lebih efisien. tp sbnr ny konsep nya sama

Message edited by SecondHand - Monday, 2013-11-11, 3:48 PM
 
Daffa_MageDate: Tuesday, 2013-11-12, 8:00 PM | Message # 5
Grand Leader
Group: Administrators
Messages: 76
Awards: 1
Reputation: 6
Status: Offline
Sebenarnya efisien itu bisa dibilang aspek utama bagi para koder. Itulah mengapa metode PnF adalah metode yang paling sering digunakan.
 
SecondHandDate: Wednesday, 2013-11-13, 7:47 PM | Message # 6
Indomodder Super Legendaris
Group: Moderator Resources
Messages: 19
Awards: 0
Reputation: 2
Status: Offline
iya krn metode nya PnF itu mudah sekali diperlajari smile
 
crystal_maidenDate: Monday, 2013-12-23, 0:24 AM | Message # 7
Pemula
Group: Member
Messages: 17
Awards: 0
Reputation: 3
Status: Offline
1 Pertanyaan, Kapan TempLoop Itu Di-Set...? Apa Pas Dibuat Di Variable Editor, Diisi Initial-nya Gitu...?
Koq Tau-tau Langsung For each (Integer TempLoop) from 1 to TempIndexMax, do (Actions), Terus Langsung Dipake Buat Array Lagi (BlaBlaBla[TempLoop])...
Mohon Penjelasannya, Masih Baru Dalam Triggering...
Yang Di PnF Juga Begitu, For each (Integer BlaBlaBla_1) from 1 to BlaBlaBla_2, do (Actions), Mau Tanya Malu Pas Liat Komennya Pada Yang Udah Ngerti Semua...
 
Daffa_MageDate: Saturday, 2013-12-28, 4:53 PM | Message # 8
Grand Leader
Group: Administrators
Messages: 76
Awards: 1
Reputation: 6
Status: Offline
crystal_maiden, TempLoop itu dibuat di Variable Editor (jenisnya Integer) , variable akan terset/teratur secara otomatis (gak perlu di set lagi, buat aja di Variable Editor, trus langsung pake). TempLoop itu digunakan untuk mengurutkan index semua caster supaya jangan meleset.
 
RheikoDate: Monday, 2013-12-30, 5:02 PM | Message # 9
Co-Admin
Group: Administrators
Messages: 42
Awards: 2
Reputation: 12
Status: Offline

Quote
1 Pertanyaan, Kapan TempLoop Itu Di-Set...? Apa Pas Dibuat Di Variable Editor, Diisi Initial-nya Gitu...?
Tidak, TempLoop bertambah seiring TempIndexMax bertambah


Quote
Koq Tau-tau Langsung For each (Integer TempLoop) from 1 to TempIndexMax, do (Actions), Terus Langsung Dipake Buat Array Lagi (BlaBlaBla[TempLoop])
Gini konsepnya
satu kali cast
TempIndexMax = 1
For each (Integer TempLoop) from 1 to TempIndexMax, do (Actions)
TempLoopnya juga 1
(BlaBlaBla[TempLoop]) Inget tadi TempLoopnya 1

dua kali cast
TempIndexMax = 2
For each (Integer TempLoop) from 1 to TempIndexMax, do (Actions)
TempLoopnya jadi 2
(BlaBlaBla[TempLoop]) Inget tadi TempLoopnya 2

Sama dengan:
Satu kali cast (BlaBlaBla[1])
Dua kali cast (BlaBlaBla[2])

jadi setiap variable tidak akan tertimpa
 
Daffa_MageDate: Wednesday, 2014-01-01, 11:31 AM | Message # 10
Grand Leader
Group: Administrators
Messages: 76
Awards: 1
Reputation: 6
Status: Offline
>Sambungan post Rheiko<
Jika variabel tertimpa maka salah satu pengguna akan mendapat masalah saat jurus berlangsung.
Ingat, variabel bisa menampung sampai 8190 pengguna (yang hampir mustahil untuk terjadi dalam 1 waktu).
Hashtable disisi lain bisa menampung 2^31 pengguna.
 
Forum » Dunia Modding Warcraft III » Warcraft III Tutorial » Cara mudah membuat MUI Spell
  • Page 1 of 1
  • 1
Search: