Snippet DayNightRequirements

SanKakU

Member
Reaction score
21
>but what about the ability learning?
What do you mean?

ok, how simple can you make it for a unit to have a breath ability that is a fire breath at day time and an ice breath at night time?
on top of that make it be a hero ability. now is it still easy?

i added a couple hero abilities to the test map...but i haven't tried to combine them into one hero ability.

i've done it already, and that's where it starts to get complicated. i invite someone else to take a try at it...
 

Jesus4Lyf

Good Idea™
Reaction score
397
>now is it still easy?
On day time, add engineering upgrade. On night time, remove it. 2 one-line GUI triggers.

You'd need to disable a spellbook ability for each player on map init as well, and make the spellbook dummy abil to hide the upgrade, but it's pretty straight forward stuff... :)

PS. Engineering upgrade changes one hero ability into another, as long as the base ability is the same.
 

Azlier

Old World Ghost
Reaction score
461
My "system" is really just for basic things like a triggered Shadowmeld, made incredibly easy to do. No trigger for each new spell.

>i can't say mine looks better than his...but that doesn't mean it's not better, because it is...

Mine is simpler, faster, and easier to use. I have no idea how to use yours, and I'm quite experienced with this stuff. You expect a fresh GUI-to-Jass user to understand your system?
 

Executor

I see you
Reaction score
57
If you want to use his sys, you would have to insert your 2 day/night ability raw codes into his system code and make sure your abilities are swapped (add the 'swap' to some function). No Interface, no clean code, no nothing.. nothing compared to Azlier's coding quality.

@SanKakU:

This would be a nice interface:
JASS:

function AddDayNightAbil(referenceAbil,dayAbil,nightAbil)
 

SanKakU

Member
Reaction score
21
My "system" is really just for basic things like a triggered Shadowmeld, made incredibly easy to do. No trigger for each new spell.

>i can't say mine looks better than his...but that doesn't mean it's not better, because it is...

Mine is simpler, faster, and easier to use. I have no idea how to use yours, and I'm quite experienced with this stuff. You expect a fresh GUI-to-Jass user to understand your system?

look, man, the entire point of me posting my pathetic system was so that you or someone else would try to post something better. and you have. i'm just trying to make sure that you get everything together and not just leave a bunch of things undone. now were you going to try adding the things i asked for like how Jesus4Lyf suggested or am I going to have to do it?
 

Azlier

Old World Ghost
Reaction score
461
I CANNOT automate such a thing. It's simply not possible.

I can automate one ability becoming something different at day/night though.
 

tooltiperror

Super Moderator
Reaction score
231
look, man, the entire point of me posting my pathetic system was so that you or someone else would try to post something better. and you have. i'm just trying to make sure that you get everything together and not just leave a bunch of things undone. now were you going to try adding the things i asked for like how Jesus4Lyf suggested or am I going to have to do it?

So let me understand this, you created a thread with a resource so that someone else could create it?
 

Jesus4Lyf

Good Idea™
Reaction score
397
@SanKakU
If you want to toggle between breath of fire and breath of frost as hero abilities, you do not need any code with this system (except one thing on init). In the object editor, make the fire hero ability, the frost hero ability, an engineering upgrade which switches one to the other and requires the dummy night unit from this system, and a spellbook to hide the engineering upgrade. Give the hero the fire ability, and the spellbook ability, and on map initialisation, have a simple trigger disable the spellbook ability for each player.

You are done. This system should have added both an IsDay and IsNight boolean in my opinion, and that's about it. Hm, and someone should test the above. :p
 

Azlier

Old World Ghost
Reaction score
461
Now has IsDay, IsNight booleans.
 

Azlier

Old World Ghost
Reaction score
461
Well then I can't do anything for you.

Either that or recreating units (ruins the fun of recycling) or morphing (not instant :().
 

Azlier

Old World Ghost
Reaction score
461
Technically I could have all 3 with some static if hackery. But that's hackery.
 

Azlier

Old World Ghost
Reaction score
461
You know, I don't think it does. I can remedy that as long as nobody makes a custom item based on that ability :|.
 

Jesus4Lyf

Good Idea™
Reaction score
397
Make a dummy unit with 10 hit points. Make it regen 2 hp/s at night only. Give it an ability that regens -1 hp/s. Write a trigger that when the unit's life goes under 8, set it to 8 and flag Day. When it goes over 8, set it to 8 and flag night. Something like that. :p

Figure out a way to make it efficient. Make it an Event. Useful. :thup:

Edit: Better yet, it would be perfect if you have 2 units, and when the day finder unit goes over 8 health, set the night finder unit's health to 8. And vice versa. Make them both regen, one only in day, one only in night, or whatever. Then you have O(1) complexity day/night detection which works for all custom change-to-night abilities. :)
 

Azlier

Old World Ghost
Reaction score
461
Alright, done. It now requires the DNE system. :p

Since these do two totally different things, they are different systems.
 

SanKakU

Member
Reaction score
21
well i don't know exactly what you two are going on about now but the moonstone is definitely something to be concerned about...

anyways...i'm planning on testing out what Jesus4Lyf suggested about the engineering upgrade and let you know how it goes...right now it might be a bit before I get around to it though because honestly I've really been madly looking for a job lately...

anyway i don't really remember trying to use spellbooks that way but i guess i'll give it a shot...

So let me understand this, you created a thread with a resource so that someone else could create it?

i created the thread about a resource that i was working on, and not doing very good with i might add. as it is the system has apparently not been finished...as far as i'm concerned the instructions from Jesus4Lyf who isn't even the system creator about how to implement certain aspects of the system are a little fuzzy...

basically i'm trying to have a discussion on the forum, and as someone suggested, perhaps it should've been started in the Jass Help Forum, but this one seemed more appropriate because one of it's subforums is for systems.

it's not so hard to comprehend, i posted some amateurish code(might even call it gibberish), this nice Azlier and Jesus4Lyf are trying to figure out what the heck kindof crazy heroes I was designing and what kindof system is what's needed for them. end of story.
 

quraji

zap
Reaction score
144
as far as i'm concerned the instructions from Jesus4Lyf who isn't even the system creator about how to implement certain aspects of the system are a little fuzzy...

Jesus4Lyf is a experienced with resources and a resources mod...he has a say ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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