• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[2 Spell requests] hard ones

Status
Not open for further replies.
Level 22
Joined
Feb 4, 2005
Messages
3,971
Don't even bother with that today and on Jan 1st, enjoy the holidays :)

If you would like to do these 2 later, in JASS would be more compact and better made, I don't do JASS.

icon4.gif
Hard: the arbiter invis ability, the name is Refractive Cloak. I'm not making SC or an arbiter but I recreated a model from another game and it seems one of his abilities is exactly the same. Could you make it a passive 1 level, no icon (for a unit) ability that makes all friendly units (not buildings) within 500 range of the caster invisible? Targets: Friendly,Ground, Air but not to work on another unit of the same type. That is - if there is another cyber caster within 500, the invis to affect all units but the cyber casters (i.e the other caster to be still visible). And if a unit is away from that range - ofc visible again.

icon4.gif
Harder: A channeling autocast ability, where as soon as the caster finishes the ability (not stops or cancels) to change the owner of the targeted unit to the owner of the casting unit (smth like channeling charm or possess). What really makes this hard for me to make is, I don't just want to take control of whoever. This is an ability that is supposed to work only on other robots, not every mechanical but only robots and not on this caster unit-type. I tried to create a condition like Integer Comparison or Real where I could give conditions: default turn speed of (target unit of ability being cast) equal to 0.50 but many units have the same turn speeds, mvmnt, heights, point value, food cost/supply or if I try to use (current turn speed/movement etc.) the trigger change owner doesn't work. So it should take over a specific type of units, I need something unique to add to each of the robots, so that I can do such abilities on them and not on other mechanical like tanks or trucks. Using Boolean - a unit is an ancient equal to true and classifying it as ancient also didn't work.

Note that the specifications about to do cyber ability only on robots, not every mechanical refers to this (2nd) ability. For the first, I only don't want invis to affect other same unit-type.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
1. Im not sure, but can it be that Wind Walk can effect other units ? It has AOE (default 0) and also can effect Air,Ground...

You could also make it so if a unit has a buff (which a dummy will give at the targeted area), you will set his transparency to 0% (animation - vertex coloring) but then he will be invisible also to the owner :p


2. Ever heard of Unit Type conditions ?
 
Level 3
Joined
Aug 24, 2007
Messages
77
Both are easy. I'll make these later tonight for you.

Edit: with the first one, do you want the unit to become visible if it strays 500 away from the casting unit?
 
Level 3
Joined
Mar 24, 2007
Messages
51
they're both easy... just messing with the object editor is almost 99% enough to correct those problems
if u just set these units to a specific unit type (kinda making this kind of unit THE ONLY one of a kind in whole map), then setting the conditions at the code: if unit is not of that kind, both of those should work properly
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
1. The best is when you get the most suitable spell. I didn't know Windwalk has AOE. It should be passive though. I didn't find an invis aura among the spells. The thing is the caster X should make the others invisible but not another caster X and not himself. @Ghostwolf, thx the 1st is rly easier but I wanted soemone to JASS it for easy use prolly a more compact way.

2. I wanted to add a specific value that can differentiate say robots from other mechanical units but since if I use default speed, prop windows angle, etc - many units have the same default values, I would then be able to take over other units that are not 'robots'. If there is no way to make smth unique for the 'robots', then I would just have to add the condition 'Unit type of target unit of ability being cast equal to..' for every robot I want to make possess-able and on every map. Well, I was asking in case there is smth that can be done that I do not know. The final solution will be to add condition on every map for every robot, which is ok, copy paste and done.

Remember for 2ns : autocast is preferrable, it won't hurt if it is not, but it should be a chanelling spell. Thx Joosh7, if you do them.


@Lokko, yes I tried with ancient, summoned but the trigger 'change owner' does not work for that.
 
Level 3
Joined
Mar 24, 2007
Messages
51
2. I wanted to add a specific value that can differentiate say robots from other mechanical units but since if I use default speed, prop windows angle, etc - many units have the same default values, I would then be able to take over other units that are not 'robots'.

so change them to fit...
or u can make a dummy buff for robots, then use "unit has buff" condition, easy done

edit: btw, i just can't do this cuz i don't have enough time and that my solutions most likely vary 100% from map to map
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
first is very very very very .... easy
second is easier than first
both GUI

Im little tired
Ghostwolf can make those in 10 secs I guess
 
Level 11
Joined
Aug 25, 2006
Messages
971
Here joosh_7 I'm going to optimize that for better performance effect. Credits to you.

Here it is, optimized, no leaks and runs faster.

If you've never implemented jass code before and you don't know how to view rawcodes, post again.
 

Attachments

  • Spells.w3x
    15.7 KB · Views: 34
Last edited:
Level 3
Joined
Aug 24, 2007
Messages
77
I tested both for leaks and your leaked 5.5MB a minute while mine didn't leak at all... I may be knew to WE but just because its GUI doesn't means it leaks (I put in custom scripts to remove groups and rects).

I suggest The.Terran uses the original.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
IMPORTANT YOU DONT NEED TO
set <groupvar> = somegroup
Pick every units in <groupvar> and do actiond
loop
----somethings
call DestroyGroup(<groupvar>)

Just put a Custom script: set bj_wantDestroyGroup = true

the BJ native that groups units checks for that bj_wantDestroyGroup and
destroys the group after actions if its true


WHAT THE...

You dont need PlayableMap = Entiremap

man dont you have some logic
 
Level 11
Joined
Aug 25, 2006
Messages
971
Hahahahaha your pretty funny. If I'd worked my very hardest to create leaks I couldn't have made 5.5mb leak per minute...
Besides, its not the original anymore if you updated it. Mine will still be faster because its jass and yours is gui.

*Note: I fixed a very small leak in the original code.

I agree with Need_O2. Your method of dealing with the entire map is rather... pointless.

I really don't care who's code TheTerran uses because obviously its his choice. I've done what I can, hes the client so its his decision.
 
Level 3
Joined
Aug 24, 2007
Messages
77
Hahahahaha your pretty funny. If I'd worked my very hardest to create leaks I couldn't have made 5.5mb leak per minute...
Besides, its not the original anymore if you updated it. Mine will still be faster because its jass and yours is gui.

*Note: I fixed a very small leak in the original code.

I agree with Need_O2. Your method of dealing with the entire map is rather... pointless.

I really don't care who's code TheTerran uses because obviously its his choice. I've done what I can, hes the client so its his decision.

I don't really care because I'm really new to WE, I didn't change anything in my original map (why would I?) and I don't mind whos script he uses. The whole "which is fastest" thing doesn't really matter unless your map is extremely script heavy. Anyway, you did leak 5.5mb/minutes and heres some screen shots I took:
 

Attachments

  • lol.jpg
    lol.jpg
    61.7 KB · Views: 101
  • lol2.jpg
    lol2.jpg
    65.7 KB · Views: 108
Level 20
Joined
Apr 22, 2007
Messages
1,960
Well actually wd40bomber7, you ARE leaking in two spots, both on the same line:
JASS:
call GroupEnumUnitsInRect(Nar,GetWorldBounds(),null)
GetWorldBounds creates a new rect EACH TIME you call it! You should use bj_mapInitialPlayableArea, which is a bj_ global, instead.

The null filter is also leaking. Do this instead:
JASS:
function True takes nothing returns boolean
    return true
endfunction
...
call GroupEnumUnitsInRect(Nar,bj_mapInitialPlayableArea,Filter(function True))
...

That should be better :p

EDIT: You're also leaking in the RunNow function... You forget to null the 'u' variable before you 'return'.
 
Level 11
Joined
Aug 25, 2006
Messages
971
Lol, Thanks hindyhat, I was really tiered both times I looked at that code. Hats off to you joosh_7.

Null filters leak? Thats news to me...
BTW your code doesn't work. It wants me to declare 'true'

Note: Update map at original post

Anyway, now its clean. Anyway joosh_7 if you've only been using WE for a while and your already catching on to cleaning your leaks, your farther then I was at that time. Now of course I'm very good with jass. (Except when I'm so damn tiered...) I'm sure you'll be up to JASS in no time.
 
Level 3
Joined
Aug 24, 2007
Messages
77
lol, I have a very basic understanding of JASS (had to in order to use HINDYHAT's SEE v1.1) but using GUI and then JASS to clean up leaks is so much easier. I thought that the region would leak and thats why I made it a variable (my noob caution :wsmile:)
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
Thank you very much joosh_7, ! I am not newb and triggers are my best part but you did it all in one trigger and the other w/o the need of a trigger. I will create special effects myself.

Just a note: I needed to change not only combat- targeted as, but also unit classification. In that way I cannot select a mechanical that is not sucidal or an organic at all. Weird, I tried many combinations of unit classifications but didn't work - yours worked. Also I've done harder things and couldn't figure these triggers out. That's because I don't use Custom Script and that seemingly makes things easier.

Also: the units don't instantly become visible after the Tester is away, it takes few seconds but that is ok. You made the ability so, don't need to work more. Thanks!

I also don't use JASS. I thought it would require many things and with GUI it would be many triggers but in that case GUI is excellent. I use GUI too.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
function GetKillingUnitBJ takes nothing returns unit
return GetKillingUnit()
endfunction

and you say GUI is excellent :p
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
haha no problem but the custom scipts I used were just to remove memory leaks

It is nice to see that with casting time a unit can escape the possession when retreating and being off the casting range, that's what I wanted. But I also wanted to add some effects as buffs to both caster and target while it is channeling and casting time doesn't make it a channeling ability. Do you know how can I make such special effects to occur? Because with events such as - begins/finishes/starts channelling the actions occur after the 10 sec casting time, when the spell really starts and therefore it is like 1 sec if u see effects. I shouldn't make triggers - change owner because then when the ability is started no matter if the unit escapes the range - it will be possessed/changed owner. Possess channeling would be perfect if the unit didn't disappear. Otherwise, I'll have to use a dummy to cast the ability but then again the target won't be able to save itself from possession when running away. That's why I'll rather request a JASS.

You did help me a lot with the targets (so that specific type of mechanical, fyi - only unit classification mechanical and suicidal matters, even when combat is - targeted as ground) and I'm sorry to say I also created my version of invisibility aura.
 
Status
Not open for further replies.
Top