View Full Version : Help FOR JASS ....neeeded
he11g0tfi113d
07-06-2007, 6:52 AM
Hey i am trying world editor on my own for like the past 2 weeks ......and i have come as far as making cinematics..........but can someone help me custom variables.....i heard that jass was used for custom triggers,variables and all that....so anyone got a tutorial or any thing to help me out here
uberfoop
07-06-2007, 12:54 PM
JASS has nothing to do with being able to use variables.
As for 'custom triggers' and 'custom variables', I REALLY think you need to get more used to the wc3 mapping system. I've never known anyone who could make a non-custom trigger, and there sure aren't all that many useable blizzard-defined globals. Pretty much this is a list of the only possible non-custom vars, almost all of which are useless for practical purposes. If you are using any variable other than the following, it's custom:
force bj_FORCE_ALL_PLAYERS = null
force array bj_FORCE_PLAYER
integer bj_MELEE_MAX_TWINKED_HEROES = 0
// Map area rects
rect bj_mapInitialPlayableArea = null
rect bj_mapInitialCameraBounds = null
// Utility function vars
integer bj_forLoopAIndex = 0
integer bj_forLoopBIndex = 0
integer bj_forLoopAIndexEnd = 0
integer bj_forLoopBIndexEnd = 0
boolean bj_slotControlReady = false
boolean array bj_slotControlUsed
mapcontrol array bj_slotControl
// Game started detection vars
timer bj_gameStartedTimer = null
boolean bj_gameStarted = false
timer bj_volumeGroupsTimer = CreateTimer()
// Singleplayer check
boolean bj_isSinglePlayer = false
// Day/Night Cycle vars
trigger bj_dncSoundsDay = null
trigger bj_dncSoundsNight = null
sound bj_dayAmbientSound = null
sound bj_nightAmbientSound = null
trigger bj_dncSoundsDawn = null
trigger bj_dncSoundsDusk = null
sound bj_dawnSound = null
sound bj_duskSound = null
boolean bj_useDawnDuskSounds = true
boolean bj_dncIsDaytime = false
// Triggered sounds
//sound bj_pingMinimapSound = null
sound bj_rescueSound = null
sound bj_questDiscoveredSound = null
sound bj_questUpdatedSound = null
sound bj_questCompletedSound = null
sound bj_questFailedSound = null
sound bj_questHintSound = null
sound bj_questSecretSound = null
sound bj_questItemAcquiredSound = null
sound bj_questWarningSound = null
sound bj_victoryDialogSound = null
sound bj_defeatDialogSound = null
// Marketplace vars
trigger bj_stockItemPurchased = null
timer bj_stockUpdateTimer = null
boolean array bj_stockAllowedPermanent
boolean array bj_stockAllowedCharged
boolean array bj_stockAllowedArtifact
integer bj_stockPickedItemLevel = 0
itemtype bj_stockPickedItemType
// Melee vars
trigger bj_meleeVisibilityTrained = null
boolean bj_meleeVisibilityIsDay = true
boolean bj_meleeGrantHeroItems = false
location bj_meleeNearestMineToLoc = null
unit bj_meleeNearestMine = null
real bj_meleeNearestMineDist = 0.00
boolean bj_meleeGameOver = false
boolean array bj_meleeDefeated
boolean array bj_meleeVictoried
unit array bj_ghoul
timer array bj_crippledTimer
timerdialog array bj_crippledTimerWindows
boolean array bj_playerIsCrippled
boolean array bj_playerIsExposed
boolean bj_finishSoonAllExposed = false
timerdialog bj_finishSoonTimerDialog = null
integer array bj_meleeTwinkedHeroes
// Rescue behavior vars
trigger bj_rescueUnitBehavior = null
boolean bj_rescueChangeColorUnit = true
boolean bj_rescueChangeColorBldg = true
// Transmission vars
timer bj_cineSceneEndingTimer = null
sound bj_cineSceneLastSound = null
trigger bj_cineSceneBeingSkipped = null
// Cinematic mode vars
gamespeed bj_cineModePriorSpeed = MAP_SPEED_NORMAL
boolean bj_cineModePriorFogSetting = false
boolean bj_cineModePriorMaskSetting = false
boolean bj_cineModeAlreadyIn = false
boolean bj_cineModePriorDawnDusk = false
integer bj_cineModeSavedSeed = 0
// Cinematic fade vars
timer bj_cineFadeFinishTimer = null
timer bj_cineFadeContinueTimer = null
real bj_cineFadeContinueRed = 0
real bj_cineFadeContinueGreen = 0
real bj_cineFadeContinueBlue = 0
real bj_cineFadeContinueTrans = 0
real bj_cineFadeContinueDuration = 0
string bj_cineFadeContinueTex = ""
// QueuedTriggerExecute vars
integer bj_queuedExecTotal = 0
trigger array bj_queuedExecTriggers
boolean array bj_queuedExecUseConds
timer bj_queuedExecTimeoutTimer = CreateTimer()
trigger bj_queuedExecTimeout = null
// Helper vars (for Filter and Enum funcs)
integer bj_destInRegionDiesCount = 0
trigger bj_destInRegionDiesTrig = null
integer bj_groupCountUnits = 0
integer bj_forceCountPlayers = 0
integer bj_groupEnumTypeId = 0
player bj_groupEnumOwningPlayer = null
group bj_groupAddGroupDest = null
group bj_groupRemoveGroupDest = null
integer bj_groupRandomConsidered = 0
unit bj_groupRandomCurrentPick = null
group bj_groupLastCreatedDest = null
group bj_randomSubGroupGroup = null
integer bj_randomSubGroupWant =
integer bj_randomSubGroupTotal = 0
real bj_randomSubGroupChance = 0
integer bj_destRandomConsidered = 0
destructable bj_destRandomCurrentPick = null
destructable bj_elevatorWallBlocker = null
destructable bj_elevatorNeighbor = null
integer bj_itemRandomConsidered = 0
item bj_itemRandomCurrentPick = null
integer bj_forceRandomConsidered = 0
player bj_forceRandomCurrentPick = null
unit bj_makeUnitRescuableUnit = null
boolean bj_makeUnitRescuableFlag = true
boolean bj_pauseAllUnitsFlag = true
location bj_enumDestructableCenter = null
real bj_enumDestructableRadius = 0
playercolor bj_setPlayerTargetColor = null
boolean bj_isUnitGroupDeadResult = true
boolean bj_isUnitGroupEmptyResult = true
boolean bj_isUnitGroupInRectResult = true
rect bj_isUnitGroupInRectRect = null
boolean bj_changeLevelShowScores = false
string bj_changeLevelMapName = null
group bj_suspendDecayFleshGroup = CreateGroup()
group bj_suspendDecayBoneGroup = CreateGroup()
timer bj_delayedSuspendDecayTimer = CreateTimer()
trigger bj_delayedSuspendDecayTrig = null
integer bj_livingPlayerUnitsTypeId = 0
widget bj_lastDyingWidget = null
// Random distribution vars
integer bj_randDistCount = 0
integer array bj_randDistID
integer array bj_randDistChance
// Last X'd vars
unit bj_lastCreatedUnit = null
item bj_lastCreatedItem = null
item bj_lastRemovedItem = null
unit bj_lastHauntedGoldMine = null
destructable bj_lastCreatedDestructable = null
group bj_lastCreatedGroup = CreateGroup()
fogmodifier bj_lastCreatedFogModifier = null
effect bj_lastCreatedEffect = null
weathereffect bj_lastCreatedWeatherEffect = null
terraindeformation bj_lastCreatedTerrainDeformation = null
quest bj_lastCreatedQuest = null
questitem bj_lastCreatedQuestItem = null
defeatcondition bj_lastCreatedDefeatCondition = null
timer bj_lastStartedTimer = CreateTimer()
timerdialog bj_lastCreatedTimerDialog = null
leaderboard bj_lastCreatedLeaderboard = null
multiboard bj_lastCreatedMultiboard = null
sound bj_lastPlayedSound = null
string bj_lastPlayedMusic = ""
real bj_lastTransmissionDuration = 0
gamecache bj_lastCreatedGameCache = null
unit bj_lastLoadedUnit = null
button bj_lastCreatedButton = null
unit bj_lastReplacedUnit = null
texttag bj_lastCreatedTextTag = null
lightning bj_lastCreatedLightning = null
image bj_lastCreatedImage = null
ubersplat bj_lastCreatedUbersplat = null
// Filter function vars
boolexpr filterIssueHauntOrderAtLocBJ = null
boolexpr filterEnumDestructablesInCircleBJ = null
boolexpr filterGetUnitsInRectOfPlayer = null
boolexpr filterGetUnitsOfTypeIdAll = null
boolexpr filterGetUnitsOfPlayerAndTypeId = null
boolexpr filterMeleeTrainedUnitIsHeroBJ = null
boolexpr filterLivingPlayerUnitsOfTypeId = null
// Memory cleanup vars
boolean bj_wantDestroyGroup = false
Kinda scary how many vars blizzard.j inits at the start of a game, isn't it?
edit: Speaking of which, here's a good tut site. (http://www.thehelper.net/forums/forumdisplay.php?f=90)
WarInSerbia
07-06-2007, 2:17 PM
You don't need Jass for cinematics but it can help you with variables.
And welcome to WB :)
he11g0tfi113d
07-06-2007, 3:18 PM
thnx you guys ........well hoping to make some neat cinematics on the history and future of warcraft 3 stories
totally scary dude
what trigger should i use exit the game as well as cinematics at once
bomber7
07-06-2007, 4:43 PM
Okay one thing to stay away from is TRIPLE POSTING and DOUBLE POSTING. We have an edit button for that. Anyway to end the game use the 'Victory' or 'Defeat' Triggers. If you cant find them click the category box above the 'action selection' box and click search for text. Then type in w/e your looking for. Variables are quite simple, its just simple algebra. Say you want to know when 10 units have gone past a location. Make a location there then make a trigger like so.
Event: Unit enters rect 'Past this Point'
Action: If x = 10 then Display Text to (All Players) "10 have past the point!" else x = x + 1
uberfoop
07-06-2007, 7:13 PM
Bloody hell, you guys are blowing my mind. The actions are called actions or function calls, not triggers. 'Trigger' is a reference to either a single trigger within a gui-made system or a trigger handle object.
Trigger should never be used for function calls because in those cases no trigger object is involved, with exception to the trigger that MUST fire for the function calls to happen, but that has nothing to do with the calls themselves.
I think you just need to mess around with the trigger editor for about a week or two longer before asking questions. I don't mean that offensively, simply stating what I think will help your understanding.
Anyhow, JASS does not increase the theoretical capabilities of what you can do with the normal GUI editor AT ALL. It simply allows you to make the stuff easier and more efficiently. It also happens to be a programming language. If you want to learn it, go use the link I gave and read through the tutorials. It's pretty simple.
bomber7
07-07-2007, 12:08 AM
Personally I use the term incorrectly in the place of 'sub' because i conclude anything that does not return a value must be one. lol And for your information i get along VERY well with using weu's gui combined with some of my own functions to be hellishly efficient. Going all out jass has always been an option but sometimes jass IS harder then GUI and sometimes GUI is harder then jass. Thats why i use a combination of the two as my personal preference. I'm hoping to make a tutorial one of these days to show off the use of using a combination but i just haven't had enough motivation.
uberfoop
07-07-2007, 3:32 AM
Meh, GUI just becomes too much of a pain in the arse when dealing with formulas and such, ESPECIALLY if you get something wrong and need to go back and edit it. I've always found that JASS is faster. And in any case, pure JASS can be made much more efficient (eg horrible condition func conversion).
edit: and, well, if you decide to use JNGP's editor, that vJASS owns. Most of the capabilities have no bearings whatsoever on what the post-compiled map looks like, but the ability to do things like declare globals without that anoying interface is soooo pwn.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.