(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > Triggers & Scripts

Triggers & Scripts Discussions regarding GUI triggers & JASS/AI scripts may be found here. Please review the » JASS Tutorials » Trigger Tutorials

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 12-01-2007, 10:29 PM   #1 (permalink)
 
Super-Sheep's Avatar

proleet
 
Join Date: Oct 2006
Posts: 678

Super-Sheep has little to show at this moment (29)Super-Sheep has little to show at this moment (29)Super-Sheep has little to show at this moment (29)


Question What is the difference between array variable and non-array variable

Yes.

I really don't know, but I think that I should.
Super-Sheep is offline  
Old 12-01-2007, 11:08 PM   #2 (permalink)
 
Razorbrain's Avatar

Awaiting WAR
 
Join Date: Aug 2006
Posts: 1,127

Razorbrain is on a distinguished road (67)Razorbrain is on a distinguished road (67)


An array variable is an variable with an "internal number" inside itself. This makes its easier to access in some cases.
Events
Unit - A unit Is attacked
Conditions
Actions
Set Unit[1] = (Attacking unit)
Set Unit[2] = (Attacked unit)
Set Unit[3] = (Random unit in (Playable map area))
Unit - Kill Unit[(Random integer number between 1 and 3)]
instead of

Events
Unit - A unit Is attacked
Conditions
Actions
Set Integer = (Random integer number between 1 and 3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Integer Equal to 1
Then - Actions
Unit - Kill (Attacking unit)
Else - Actions
If (All Conditions are True then do (Then Actions) else do (Else Actions)
If - Conditions
Integer Equal to 2
Then - Actions
Unit - Kill (Attacked unit)
Else - Actions
Unit - Kill (Random unit in (Playable map area))

yes, i know the triggers leak, but its just to show :P
__________________
Quote:
Originally Posted by Inside the Chatroom
[00-25-37] Razorbrain is sitting on the toilet doing private stuff Lirch
[00-25-39] Lirch is sitting on the toilet doing private stuff Razorbrain
[00-25-45] Lirch *censored* Razorbrain in the mouth.
[00-25-50] DrunkenPanda200: WTF?
[00-25-51] Razorbrain: :(
Razorbrain is offline  
Old 12-01-2007, 11:30 PM   #3 (permalink)
 
Super-Sheep's Avatar

proleet
 
Join Date: Oct 2006
Posts: 678

Super-Sheep has little to show at this moment (29)Super-Sheep has little to show at this moment (29)Super-Sheep has little to show at this moment (29)


Hehe. Thanks.

That's very simple now for me.
Super-Sheep is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialog Variable Array? STARS-ZombE World Editor Help Zone 1 12-30-2007 07:48 PM
[Trigger] Real variable to be used many times, needs array? Kenoriga Triggers & Scripts 3 05-12-2007 05:07 AM
A doubt about Array Unit Group Variable! Thanatos Triggers & Scripts 4 09-06-2005 09:06 PM
Array variable trouble Lingonberryjam Map Development 9 09-01-2005 08:54 PM
Array Tutorial Draqz Trigger (GUI) Editor Tutorials 0 05-13-2005 11:10 PM

All times are GMT. The time now is 07:50 PM.






Your link here 
Bedat Watches | Actress | Remortgages | Magazine Subscriptions | Cheap Fragrances
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle