Problem with jass

Sonic

New Member
Reaction score
10
I did jass spell, and when I wanted to check the spell , but the map wasn't loading it was an error , I saved a map and checked then map worked perfectly , but when I wanted to check again , it wasn't loading it works only after saving
How to fix this problem?+rep
 

Sonic

New Member
Reaction score
10
But the spell is not my, I downloaded from hiveworkshop but if you need map say me
Code:
scope arcanebubble

//Descripitons may contain strange grammar

globals
private constant integer SID = 'A05K'
//You need to enter the spell rawcode here

private constant integer DID ='h01P'
//You need to enter the dummy rawcode here

private constant string sfx = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
//You may change the special effect wich is created when the units fall on the ground

private constant string attatch_p = "origin"
//You may change the positon where the special effect is attatch to its target

private constant real damage_factor = 200
//You may adjust the damage dealt when a target is smashed onto the ground; Please notice this value will be multiplied with the level of this ability

private constant real range = 400
//You may change the range in wich a target has to stay, to be taken into the air

private constant real bubble_height = 800
//You may change the height the bubble is rising to

private constant real flyspeed = 320
//You may change the speed the bubble and the targets are flying into the air

private constant real fallspeed = 2000
//You may change the speed the targets are falling with onto the ground

private constant real stay_in_air = 5
//You may adjust how long the targets are staying in the air

private constant real craterdur = 0.7
//You may adjust the time for creating a crater at the targets position

private constant real crater_range = 120
//You may range the craters radius

private constant real crater_depth = 150
//You  may change the craters depth

//***************************************************************************************
//Global variables to cache some data for minimal amount of time; DO NOT MODIFY !
private player temp
private real temp_r
private unit temp_c
//***************************************************************************************
endglobals

//This struct will contain the main data for this spell
private struct BubbleData
unit caster
unit bubble
group targets
endstruct

//This struct will contain the data for smashing the targets on the ground
private struct FallData
unit caster
unit target
real amount
endstruct

//A filter function to prevent that the bubble takes up the wrong units
private function IsValidTarget takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),temp) == true and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE) > 0 and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false
endfunction

//GUI condition func that checks if this spell is being cast
private function Trig_Arcane_Bubble_Conditions takes nothing returns boolean
return GetSpellAbilityId() == SID
endfunction

//A function wich prepares all targets and sends them into the air; Callback for a FORGROUP CALL
private function MakeUnitsFly takes nothing returns nothing
call UnitAddAbility(GetEnumUnit(),'Arav')
call PauseUnit(GetEnumUnit(),true)
call SetUnitPathing(GetEnumUnit(),false)
call SetUnitTimeScale(GetEnumUnit(),0)
call SetUnitFlyHeight(GetEnumUnit(),GetRandomReal(bubble_height * 0.5,bubble_height * 0.85),flyspeed)
endfunction

//This function will reset each target and deals the the damage; Callback for a TIMER
private function Reset takes nothing returns nothing
local timer t = GetExpiredTimer()
local FallData r = FallData(GetHandleInt(t,"fall"))
call UnitRemoveAbility(r.target,'Arav')
call PauseUnit(r.target,false)
call SetUnitPathing(r.target,true)
call SetUnitTimeScale(r.target,1)
call UnitDamageTarget(r.caster,r.target,r.amount,false,false,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call TerrainDeformCrater(GetUnitX(r.target),GetUnitY(r.target),crater_range,crater_depth,R2I(1000 * craterdur),false)
call DestroyEffect(AddSpecialEffectTarget(sfx,r.target,attatch_p))
call DestroyTimer(t)
set t = null
call r.destroy()
endfunction

//This funciton will send the targets back onto the ground and also sets up the data for the second struct; Callback for a FORGROUP CALL
private function MakeUnitsFall takes nothing returns nothing
local timer t = CreateTimer()
local FallData d = FallData.create()
set d.target = GetEnumUnit()
set d.caster = temp_c
set d.amount = temp_r
call SetHandleInt(t,"fall",d)
call TimerStart(t,GetUnitFlyHeight(d.target) / fallspeed,false,function Reset)
call SetUnitFlyHeight(d.target,GetUnitDefaultFlyHeight(d.target),fallspeed)
set t = null
endfunction

//This function will initiallze the reset and fall function after the units stayed in the air; Callback for TIMER
private function Init_Fall takes nothing returns nothing
local timer t = GetExpiredTimer()
local BubbleData f = BubbleData(GetHandleInt(t,"Bubble"))
set temp_r = damage_factor * I2R(GetUnitAbilityLevel(f.caster,SID))
set temp_c = f.caster
call RemoveUnit(f.bubble)
call ForGroup(f.targets,function MakeUnitsFall)
call TimerStart(t,bubble_height / fallspeed,false,null)
call f.destroy()
set t = null
endfunction

//Mainfunction wich will be called when the spell is being cast; It will prepare any necessary data and units
private function Trig_Arcane_Bubble_Actions takes nothing returns nothing
local BubbleData d = BubbleData.create()
local conditionfunc CON = Condition(function IsValidTarget)
local timer t = CreateTimer()
set d.caster = GetTriggerUnit()
set temp = GetOwningPlayer(d.caster)
set d.bubble = CreateUnit(temp,DID,GetLocationX(GetSpellTargetLoc()),GetLocationY(GetSpellTargetLoc()),0)
set d.targets = CreateGroup() 
call GroupEnumUnitsInRange(d.targets,GetLocationX(GetSpellTargetLoc()),GetLocationY(GetSpellTargetLoc()),range,CON) 
call PauseUnit(d.bubble,true)
call SetUnitFlyHeight(d.bubble,bubble_height,flyspeed)
call ForGroup(d.targets,function MakeUnitsFly)
call SetHandleInt(t,"Bubble",d)
call TimerStart(t,stay_in_air,false,function Init_Fall)
call DestroyCondition(CON)
set CON = null
set t = null
endfunction

//Obviously the triggerregister func...
function InitTrig_Arcane_Bubble_Copy takes nothing returns nothing
    local trigger gg_trg_Arcane_Bubble_Copy = CreateTrigger(  )
    local integer i = 0
    loop
        call TriggerRegisterPlayerUnitEvent(gg_trg_Arcane_Bubble_Copy,Player(i),EVENT_PLAYER_UNIT_SPELL_CAST,null)
        set i = i + 1
        exitwhen i == 16
    endloop
    call TriggerAddCondition( gg_trg_Arcane_Bubble_Copy, Condition( function Trig_Arcane_Bubble_Conditions ) )
    call TriggerAddAction( gg_trg_Arcane_Bubble_Copy, function Trig_Arcane_Bubble_Actions )
    set gg_trg_Arcane_Bubble_Copy = null
endfunction

endscope



And this
Code:
library  KattanaAttatchSys
//Shortform
globals
gamecache mapcache = InitGameCache("arcanebubble.x")
endglobals
function H2I takes handle h returns integer
    return h
    return 0
endfunction
function LocalVars takes nothing returns gamecache
    return mapcache
endfunction
function SetHandleHandle takes handle subject, string name, handle value returns nothing
    if value==null then
        call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
    else
        call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value))
    endif
endfunction
function SetHandleInt takes handle subject, string name, integer value returns nothing
    if value==0 then
        call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
    else
        call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value)
    endif
endfunction
function GetHandleInt takes handle subject, string name returns integer
    return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
endfunction
endlibrary
 

Hellohihi

New Member
Reaction score
42
Yes it is vjass.

You need newgen world editor (vjass preprocessor) to compile it.

And you have to save everytime before testing map.
 

13lade619

is now a game developer :)
Reaction score
398
I did jass spell, and when I wanted to check the spell , but the map wasn't loading it was an error , I saved a map and checked then map worked perfectly , but when I wanted to check again , it wasn't loading it works only after saving

you cant just use the Test Map button if you have vjass..
that way vjass isnt 'saved' and wont load the map.

you need to hit SAVE before hitting the TestMap button.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top