• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Coders Discussion

Status
Not open for further replies.
Level 21
Joined
Aug 21, 2005
Messages
3,699
I don't like to do spells.

Craka already asked me a similar question and from what I perceived I'm to do bugfixing and systems. Maybe AI too (never done that, which is why I'm interested in doing so), although IMO everything else should work first in single player before adding in NPC's...

Edit: some code related questions:
- Are we using any coding conventions?
- How is everything organised?
- more questions I could think of but it'd probably be better to see the main chunk of code first...
 
Level 25
Joined
Mar 25, 2004
Messages
4,880
vJASS is prohibited because it causes a critical error with campaigns and erases everything - has happened once or twice already with us - which makes vJASS a program we cannot risk working with. It works fine with maps, but in campaigns/campaign maps it can reak hell.

As far as I know, everything else is fine.
Here's the jobs everyone is assigned at the moment:
  • Hanky: Spells/Abilities
  • Eleandor: Bug Fixing & Systems
  • Abdoma: Spells/Abilities
  • HvO-Busterkomo: Finish up with implementing whatever systems you are/were currently adding to the mod and then fix at least 5 bugs - I'd prefer you to fix as many as you can - and then hand it over to Eleandor to finish fixing the rest.

There are some bugs in the mod that haven't been fixed for year or perhaps even longer! It is time to make the BETA Testers feel useful and start fixing all the bugs they've been reporting. It is extremely important we fix at least 50% of the bugs. That's why I am beginning to push HvO-busterkomo and Eleandor to start focusing strongly on fixing the bugs. In the end, it will make the coders' and testers' lives much easier.
 
Level 9
Joined
Jul 18, 2005
Messages
319
@Craka: vJass doesn't cause critical errors and etc. It's just very annoying to do the vJass importing process, since you have to do everything manually via MPQ editor (it's the only way you can do it without losing half of the stuff which has already been done.)

-Av3n
 
Level 17
Joined
Jun 17, 2007
Messages
1,433
Let this be my resignation from WC3: WoW. I don't want to leave Condemned Entertainment all together, but I can't continue on this project. Here's just a few of the reasons why:

-Without being able to code in vJASS (easilly, at least), coding is much more difficult.
-Lack of communication between team members.
-It doesn't seem like anybody else is even working.
-I lost all of my work when my HDD become corrupt last week.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Let this be my resignation from WC3: WoW. I don't want to leave Condemned Entertainment all together, but I can't continue on this project. Here's just a few of the reasons why:

-Without being able to code in vJASS (easilly, at least), coding is much more difficult.
-Lack of communication between team members.
-It doesn't seem like anybody else is even working.
-I lost all of my work when my HDD become corrupt last week.

Bad news :(

Well, I was assigned the task of bugfixing, and it's pretty pointless to do this when I don't have the latest version, which is why I couldn't really do much yet...
Lack of communication, well, I agree. But who's to initiate this communication?

I also may have just found a way to easily work on the project in vjass. The idea is to use local files. It'll take some work to get everything set up to work correctly (although relatively seen, not that much work), but here's my idea:

Step 1: Allow Local files (run regedit.exe, create a new dword key "Allow Local Files" and set it to 1)
Step 2: Move all files related to this project to ...\Warcraft3\WoW
WoW would be a new folder in your warcraft 3 directory containing subfolders such as: Models, Textures, Maps.

No campaign files will be used in this phase of the development. All maps in the campaign files will simply be under the "Maps" folder now. You will be able to save the maps using vjass now (since they're not in a campaign), you will also be able to terrain in the maps (since we're using local files, ALL models & textures are available in the editor and in the game!!!), AND we'll be able to test maps individually with the "Test Map" button.
When you want to play the game, you simply start warcraft 3, custom game and scroll to the "Character selection" map (instead of clicking "custom campaign", wow and the "start" button)

The only modifications you'll have to make is simply extracting all models, textures and maps from the campaign file.

Step 3: when a new release is to be made, you simply import all models, textures & maps into a campaign, link them and it should be done.
So, a recapitulation: all work and testing can be done without using any campaign files, and beta versions (releases) can be generated into a campaign file.

This obviously has many advantages (without the disadvantages I think). Several other advantages could be introduced too. For example:
- A version manager (SVN, CSV): For those that don't know this: all the WoW content will be on a central server (all maps, textures, etc.). A small piece of software on your computer will allow you to update and commit changed. Updating consists of downloading those files from the central server, and committing consists of uploading changes you've made to Wc3:wow back to the server. This way, everyone with access to the server can, at any time, have the latest version of wc3:wow, and everyone can work on it at the same time, without the need of having to pass campaign files from 1 member to another. I can explain the use of this program further if you think it's a good idea.

- A separate folder for jass source files. If someone makes a change to a jass script, you simply update the source file, and then test it. If it works, you can copy all those files into all maps. It's a more easy approach than having to work in the actual maps, having to save it and import to every other map.

- No more ridiculous save times. You'll only be saving maps, you won't have to save a whole campaign each time you make a modification.

If you think it's a good idea to approach modding on wc3:wow this way, I could set up a server, and explain some things more in depth.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Ok, time for a small update on my part I guess...

I've not had plenty of time to work on the bugs, but I've done some progress on this area though. Don't worry.

I've also written a small application that compiles all vjass code in campaigns to jass (using already made tools such as jasshelper), practically allowing you to use vjass in campaigns. You simply use vjass in your triggers, save the campaign, and then use the tool to finalize the campaign.

It works, so we theoretically can use vjass now. In fact, with some modifications to the tool we could also use RTC natives. But I'm not the one making the calls here, so the question is: are we allowed to use vjass?

As a totally irrelevant note: what's up with the forums?
 

Attachments

  • Campaign Jass.zip
    1.7 MB · Views: 77
Level 25
Joined
Mar 25, 2004
Messages
4,880
Good work Eleandor. This is a major breakthrough since many experienced JASS coders are turned off from the idea that we couldn't use vJASS. But with this new discovery, we may be able to recruit and hold onto more skilled JASS coders. Thanks a lot! Please keep working and keep me as up to date as you can.

I haven't been on for a while due to exams, a broken PC again, and overall a busy status. I'm trying hard to get my PC fixed though and there's a wide rumor that schools in my district will close down due to the outbreak of the Swine Flu virus. If that's true, I might be able to get to work on something or at least answer emails and forum questions.

The forums were hacked by some asshole. No idea who, but I'd like to smash his face in. WDSnave is rebuilding everything, but the hacker deleted the backup files... so the forum will be all new again. The bug database miraculously survived!

ALSO, I got another application from someone to join Wc3:WoW. His name is RaiN. Here's a link to some of his work: http://www.hiveworkshop.com/forums/pastebin.php?id=j03m0c
What do you think?
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
Good work Eleandor. This is a major breakthrough since many experienced JASS coders are turned off from the idea that we couldn't use vJASS. But with this new discovery, we may be able to recruit and hold onto more skilled JASS coders. Thanks a lot! Please keep working and keep me as up to date as you can.

It's not really a discovery. It's merely a tool that automatizes the really annoying things you have to do to make vjass work on campaigns. So, nothing magically happens, it just automatizes things.

I haven't been on for a while due to exams, a broken PC again, and overall a busy status. I'm trying hard to get my PC fixed though and there's a wide rumor that schools in my district will close down due to the outbreak of the Swine Flu virus. If that's true, I might be able to get to work on something or at least answer emails and forum questions.
My exams will be starting pretty soon (in 1 month, to be precise, and I haven't done anything yet...), so probably won't be doing anything big the next weeks.
 
Level 25
Joined
Mar 25, 2004
Messages
4,880
Alright. Please try to fix all the bugs that you can and add the currency system afterwords. Once you're done with all that, maybe revamping the character creation would be a good idea. A lot of people don't like it.
I'm going to check with Hanky and Abdoma to make sure they've been working. If they haven't been working, I gotta get them to work ASAP on spells.
 
Level 25
Joined
Mar 25, 2004
Messages
4,880
Spoke with Hanky on MSN Live Messenger and he said he's been tied up with things in life which have kept him from working on Wc3:WoW related content - in this case, spells/abilities. However, he told me he's going to be testing cJASS on Wc3:WoW to ensure no critical errors occur in the process of development. If all goes well, he'll be using cJASS with vJASS on Wc3:WoW. It's not getting much done for Wc3:WoW, but at least he's doing something that will help him do so in the long-run.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Could've guessed that from the name "cjass" :p

Anyway, I've added cJass to the tool, as well as input fields for common.j and blizzard.j, in case we'd need new natives (if we ever get to using RTC)

The only downside is that you can't detect errors when you're working in newgen... You've got to run the tool in order to see syntax errors...
Can't think of a way of implementing this into world edit newgen... If they would just add a "CompileCampaign" function in wehack.lua this tool wouldn't be necessary...
 

Attachments

  • Campaign Jass.zip
    1.7 MB · Views: 76
Level 9
Joined
Jul 18, 2005
Messages
319
Hmm.... If TBR ever gets done on my side, I might do some spells... again

-Av3n

EDIT: How would you use Campaign Jass without breaking the campaign file itself? The only logical way I could think of is disable pJass + WE's checker let the campaign compile then running Campaign Jass.

EDIT2: Grimoire/JassNewGen cannot read a mpq inside a mpq, which is why it fails at saving campaigns and some programming related stuff to how Blizzard's Campaign mpq's work as well or something. But I guess this is the most simple explanation I could think of
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
EDIT: How would you use Campaign Jass without breaking the campaign file itself? The only logical way I could think of is disable pJass + WE's checker let the campaign compile then running Campaign Jass.
Not sure what you mean. If I save a campaign in newgen it just skips the part where it should compile the mapscript. This effectively breaks the campaign and makes it unplayable. If you run the tool afterwards, it fixes the campaignfile so it works.

EDIT2: Grimoire/JassNewGen cannot read a mpq inside a mpq, which is why it fails at saving campaigns and some programming related stuff to how Blizzard's Campaign mpq's work as well or something. But I guess this is the most simple explanation I could think of
Extract all maps from the campaign mpq, then read the map and compile the mapscript, then import the map into the campaign again. That's what I do. It's a pretty simple solution and I don't know why newgen doesn't do it. In fact, my tool extracts all maps, while newgen should be able to detect which maps have been modified and thus only needs to compile those maps, speeding up the process of saving the campaign.

Hanky, do you have any cJass syntax markup tool like TESH for vjass? Especially the comment blocks and c-like operators could be a great aid.
 

Attachments

  • Campaign Jass.zip
    1.8 MB · Views: 44
Level 21
Joined
Aug 21, 2005
Messages
3,699
Obviously it ain't as easy as it seems Eleandor.

Grimoire:

Bryan "PipeDream" Steinbach - [email protected]
Andy "xttocs" Scott
Mike "PitzerMike" Pitzer
Victor "Vexorian" Soliz
Nikolaj "MindWorX" Mariager

I'm a very average programmer compared to those 5, so the hell with this not being easy. They're just lazy.

Edit: for those interested, I attached a modified vJass syntax markup for cJass (notepad++)
 

Attachments

  • userDefineLang.zip
    7 KB · Views: 35
Last edited:
Level 9
Joined
Jul 18, 2005
Messages
319
Last thing not everyone has the free time to do it. Ok enough about Grimoire.

Can anyone post up the scripts/systems being used in Wc3WoW? I might code a few spells again (Since vJass can be used again!)
Oh and for a damage system, I think this will serve well (IMO) LINK, along with an extension for managing extra armor types and such... LINK. But then again I have no idea how the elemental damage in WoW works ><.
And for buffs... I came upon this problem before, it is wise to trigger your buffs.

-Av3n
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
An assertion is pretty easy though, nothing complex at all.

JASS:
function Assert takes boolean doAssert, string message returns nothing
    if doAssert then
        call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60.0, "Assertion failed: " + message)
    endif
endfunction

// Example:
local unit u = RestoreUnit(...)
debug call Assert(u == null, "Restored unit is null")
debug call Assert(itemcost < 0, "itemcost should not be less than zero")
It's just something I use to easily track bugs.

I got an (unrelated) question though: what's the maximum missions / keys you can use in a gamecache? Like: how much info can I store before I need to open another gamecache?

I may upload a template map soon with all the major systems that are used. If you notice any are missing I can add them. Maybe I'll do it tomorrow.
 
Level 9
Joined
Jul 18, 2005
Messages
319
I actually don't have any idea about the gamecache stuff lol. Apart from the fact you can only have 256 gamecaches in one map.

But to stay safe... Table only for Spells/Systems. Normal Gamecache for porting stuff over to other maps.

-Av3n
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Table also uses gamecache, so when it comes to the amount of data storable in gamecaches, there's no difference.

Also: Table says:
private constant integer MAX_INSTANCES=8100 //400000
Does that mean there's a maximum of 400000 missionkeys per cache? I guess that'll fit our needs. The main reason I was asking was because I really need to store a lot of info upon map transition...
 
Level 9
Joined
Jul 18, 2005
Messages
319
True, the thing is that I reckon we should just use standard Gamecache functions instead of using table.

@Table: I think that's the maxium amount of tables you can have. I highly doubt that we can break the limit, but we'll see.

1 primary cache to store stuff on the player's cpu
And a temp one to store info while they are on a map.

-Av3n
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
True, the thing is that I reckon we should just use standard Gamecache functions instead of using table.
Ofcourse. AFAIK Table doesn't even have a way to save the underlying cache to hard drive.

@Table: I think that's the maxium amount of tables you can have. I highly doubt that we can break the limit, but we'll see.
Yes, but Table uses caches. When a new table is created, it's assigned a missionkey. When an index of a table is used, the index corresponds with a key. Thus, if there's a maximum amount of tables of 400000, then it means you can use max. 400000 missionkeys in 1 cache, correct?
That means you can store 400000 * (keys per missionkey) variables in a single cache. I'm sure that'll be enough :)

1 primary cache to store stuff on the player's cpu
And a temp one to store info while they are on a map.
You mean 1 cache for data transfer between maps (on hard drive), and 1 cache (used in Table) for tables?
 
Level 9
Joined
Jul 18, 2005
Messages
319
Yep you got what I meant Eleandor ^^.

One thing I like with the new Table is the fact we can add mission key tags (or whatever Vex done) as a second field. However that compiles to a function call instead of it being inlined.

If I get sometime I'll start remaking some spells...

-Av3n
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Ok, here's a map that can serve as a base for spell creation.

I basically copied the most important systems from my systems map (the map containing all other systems such as camera system, item system, etc. etc.) so your trigger editor isn't too cluttered.

Some systems in the map may seem weird to have been included (such as the Currency library) but it's a dependency for other libraries, so...

There's not a whole lot of documentation, so to get you started:

use Hero.hero to refer to the main character. Hero.team contains the i'th teammember (not really implemented yet).
use Unit[unit var] to get the Unit struct that corresponds to a unit. Every unit will probably be associated with a Unit.
JASS:
local Unit caster = Unit[GetTriggerUnit()]
local Hero target = Unit[GetSpellTargetUnit()]
local Hero you = Hero.hero
call KillUnit(target.u)

A Unit also has methods to change special unit properties such as:
JASS:
local Unit caster = Unit[GetTriggerUnit()]
call caster.modifyAttackSpeed(0.3)
call TriggerSleepAction(5.0)
call caster.setAttackSpeed(caster.getAttackSpeed() - 0.3)
A Hero has additional methods for changing attributes & resistances.
Attributes aren't finished yet. Currently, if you change an attribute, it only changes the struct data. Later on, someone will have to actually modify the unit's health if stamina is modified, the unit's mana if intellect is modified, etc.
To get a list of all properties you can modify, get or set, take a look at the Bonus library.

I have also made a Bonus system (basically a wrapper) which I'll mainly be using in items (since items aren't in the 6 slot hero inventory, the effects need to be added manually), but it can also be used just as easily in spells:
JASS:
local Bonus b = Bonus.MoveSpeed(50.0)
local Hero h = Unit[GetTriggerUnit()]
call b.apply(h)
call b.unapply(h)
call b.destroy()

Also included: SpellEventModules
I think it'd be good if these modules were used to keep your spellcode clean.

Note: the whole bonus thing hasn't been tested yet, I implemented it today. But ofcourse I fully trust my leet jass skills
(*keeps fingers crossed*)

If you feel like modifying the systems in that map, please tell me so we can keep our system libraries synchronised.

Also: some systems will probably have to be replaced when patch 1.23b comes out. There's already a Table 3.0, so at least that's good.
 

Attachments

  • Spell Template.w3x
    120.8 KB · Views: 35
Level 25
Joined
Mar 25, 2004
Messages
4,880
Hey Eleandor, are you back from your vacation thing and are ready to continue working on the interface systems and so forth? Once the interface systems are done, you can start working on things such as spell resistances, parrying, dodging, new stats (Intellect, Strength, Stamina, Agility, etc.), and other stuff relevant to help make spells more accurate to World of Warcraft.

Don't forget to fix as many bugs as you can too... if you need the list provided, I'll give you it.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
*cough* vacation? What vacation? You mean my exams? Lol. I still have an exam on june 16, which is why I took a "break" from studying yesterday to work on the systems and I'm currently just browsing the web.

I also prefer to balance out my workload, so I'll be doing some things here and there instead of focussing on one system. That keeps me motivated a bit and prevents me from getting bored. So everything progresses bits by bits.
 
Level 25
Joined
Mar 25, 2004
Messages
4,880
I asked Toadcop - creator of TcX - how he was able to successfully allow pathing on multiple floors, such as allowing units to cross bridges and walk under them. Here was his response/explanation.

Toadcop said:
Hi ! =) well i don't know if i can explain it well... there are several ways to prevent\do the 3D pathing.

the most important is trigger based. On Enter|Leave events.

the most imporant to do it correctly is to sort objects. and to recaclucate it every time you leave something. so i move the unit to the map border and return it to the location. so the triggers triggering again =) and i get the needed data.
the second step is to use corrrectly the recieved data in unit movement function. in my case it's relative simple.
i have max_height = the floor if the value is 0 so i walk on ground
min_height = i am under of some floor so if i would jump i may hit with the head it.
in fact i only recently made the system properly walking, ^_^ so now it support X floors etc. but you need to remember what alot triggers and rect events may cause performance issues (if triggering alot at once so more when 2 floors isnt recommended)

ok well i will upload an open version of TcXAOS with activated stairs example ^_^
hmm you will need cJass to be able to save the map properly... or import the code into the map =) later it will full depend on cJass (AdicHelper) http://cjass.xgm.ru

MAP

here is the code for this triggers
JASS:
function HWEnterRegEvent takes nothing returns boolean
   local xunit xu=0
 if GetUnitAbilityLevel(GetTriggerUnit(),IsPlayer)>0 then
   set xu=GetUnitUserData(GetTriggerUnit())
   set hwxx=h2i(GetTriggeringTrigger())-HWminindex
   set xu.hwref=xu.hwref+1
   //set xu.hwref4=xu.hwref4+1
   //call echo("Ref count "+I2S(xu.hwref))

 if hwxx.zmax>xu.z+xu.Zstep then
  if hwxx.zmin<xu.hwminzx2 and hwxx.zmin>xu.z then
   set xu.hwminzx2=hwxx.zmin
   set xu.hwminzx=hwxx.zmin
   set xu.hwminz=hwxx.zmin
  endif
  if hwxx.zmin<xu.Zmax+xu.z and hwxx.zmax>xu.hwmaxzx2 then
   set xu.hwmaxzx2=hwxx.zmax
  endif
 elseif hwxx.zmax<=xu.z+xu.Zstep and hwxx.zmax>=xu.hwmaxzx1 then
   set xu.hwmaxzx1=hwxx.zmax
 endif



 if xu.z>=hwxx.zmax-xu.Zstep then

  if hwxx.zmax>=xu.hwmaxzx1 then
   //set xu.hwminz=0
   //set xu.hwminzx=hwxx.zmin
   set xu.hwmaxzx=hwxx.zmax
   set xu.hwmaxz=hwxx.zmax
  endif
 elseif hwxx.zmax>xu.z+xu.Zstep and hwxx.zmin<=xu.Zmax+xu.z then
if not xu.disablehw then
   //set xu.disablehw=true
  if hwxx.dummy!=null then
   call SetDestructableAnimation(hwxx.dummy,"spell") 
   call QueueDestructableAnimation(hwxx.dummy,"stand") 
  else
  endif
 if xu.hwref3==0 then
   //set xu.hwminzx=hwxx.zmin
   //set xu.hwmaxzx=hwxx.zmax
   set xu.vecx=0
   set xu.vecy=0
   set xu.veclastx=0
   set xu.veclasty=0
   set xu.x=xu.prevx
   set xu.y=xu.prevy
   call SetUnitX(xu.u,tcx_border_min_x)
   call SetUnitY(xu.u,xu.y)
   call SetUnitX(xu.u,xu.x)
   set xu.hwref3=1
 endif  
   //set HW_timeout_attach[GetTimerIdBR(xu.hwtimeout)]=xu
   //call TimerStart(xu.hwtimeout,0,false,function HW_timeout_func)
endif
 endif
 elseif GetUnitAbilityLevel(GetTriggerUnit(),IsCreep)>0 then
   set xu=GetUnitUserData(GetTriggerUnit())
   set hwxx=h2i(GetTriggeringTrigger())-HWminindex
   set xu.x=GetUnitX(xu.u)
   set xu.y=GetUnitY(xu.u)
   set xu.z=GetUnitZ(xu.u)
  if xu.z>=hwxx.zmax-xu.Zstep then
   set xu.hwmaxz=hwxx.zmax
   set xu.hwref=xu.hwref+1
   call TCM_AddCreepToStack(xu)
  elseif xu.z<=hwxx.zmin then
   set xu.hwminz=hwxx.zmin
   set xu.hwref=xu.hwref+1
  else
   set xu.vecx=0
   set xu.vecy=0
   set xu.vecz=0
  endif
 elseif IsProjX(GetTriggerUnit()) then
   set mmx=GetUnitUserData(GetTriggerUnit())
   set hwxx=h2i(GetTriggeringTrigger())-HWminindex
if hwxx.type==1 then
 if mmx.z>=hwxx.zmin and mmx.z<=hwxx.zmax then
   set doodcol=true
  if not mmx.nocoll then
   call DestroyProjBR(mmx.u)
  endif
   set doodcol=false
 endif
endif
  endif
   return false
endfunction

function HWLeaveRegEvent takes nothing returns boolean
   local xunit xu=0
 if GetUnitAbilityLevel(GetTriggerUnit(),IsPlayer)>0 then
   set xu=GetUnitUserData(GetTriggerUnit())
   set xu.hwref=xu.hwref-1
   set xu.hwref2=xu.hwref2+1
   set xu.hwmaxz=xu.hwmaxzx1
   set xu.hwminz=xu.hwminzx2
   //call echo("Ref count "+I2S(xu.hwref))
 if xu.hwref2==1 then
   call SetUnitX(xu.u,tcx_border_min_x)
   call SetUnitX(xu.u,xu.x)
 endif
 if xu.hwref<=0 then
   set xu.hwmaxz=0
   set xu.hwminz=0
   set xu.hwminzx=0
   set xu.hwmaxzx=0
   set xu.hwminzx1=-9999999
   set xu.hwmaxzx1=-9999999
   set xu.hwminzx2=9999999
   set xu.hwmaxzx2=-9999999
 endif

 elseif GetUnitAbilityLevel(GetTriggerUnit(),IsCreep)>0 then
   set xu=GetUnitUserData(GetTriggerUnit())
  if xu.hwmaxz!=0 then
   set xu.hwmaxz=0
   set xu.hwminz=0
   set xu.hwminzx=0
   set xu.hwmaxzx=0
   set xu.hwref=xu.hwref-1
   call TCM_RemoveCreepFromStack(xu)
   set xu.paused=xu.paused+1
   call PauseUnit(xu.u,true)
   set xu.x=GetUnitX(xu.u)
   set xu.y=GetUnitY(xu.u)
   set xu.z=GetUnitZ(xu.u)
   set erx=GetUnitFacing(xu.u)*0.0175
   set xu.vecx=xu.speed*Cos(erx)
   set xu.vecy=xu.speed*Sin(erx)
   set xu.vecz=0
   call TCM_AddCreepToStack1(xu)
  endif
 endif
   return false
endfunction

His English sucks but hopefully you are still able to understand what he's saying.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
One suggestion to spell makers maybe?

I think we should all use the "caster" unit from Vexorian's CasterSystem. There are several reasons why, but the main reason is it's really damn flexible. Only one caster can serve all your spell needs, it has attachment points, it can cast and other stuff. One thing though, you would have to check the CasterSystem map to see how he uses the caster unit (find functions like CasterCast and CasterCreate or whatever and just imitate that).

I don't know where to post this, but I think it would be a good idea to set it as standard.

EDIT: I'm referring to xe, actually, since it's exactly what I mean (I just checked it).

EDIT2: Eleandor, where is that SpellEvent library from? I only found Anitarf's one, but it's different from the one you implemented in your spell template map.

EDIT3: Ok I just spent 4 hours implementing and learning all the systems, making code clean etc. That SpellEvent library doesn't seem to work properly. For example, onSpellEffect method seems to be called twice... (I checked with BJDebugMsg)
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
EDIT2: Eleandor, where is that SpellEvent library from? I only found Anitarf's one, but it's different from the one you implemented in your spell template map.
Here-b-Trollz made it on wc3c.net. It's still in resource submission, when I tested it it seemed to work but if it doesn't seem to work, get rid of it and use something else you want.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Go for it.

I went for it :p

Here-b-Trollz made it on wc3c.net. It's still in resource submission, when I tested it it seemed to work but if it doesn't seem to work, get rid of it and use something else you want.

Anitarf made a SpellEvent library too, so I'm gonna use his. It offers more possibilities anyway.

EDIT: Nvm, I did something moronic with my triggers which caused the spell to fire twice. But I would still prefer Anitarf's system because it has more options.

EDIT2: If we're going to use Bonus system, then there's not need for UnitProperties, is there?

Wow, I edit a lot.
 
Last edited:
Status
Not open for further replies.
Top