A simple question

luorax

Invasion in Duskwood
Reaction score
67
Okay, so i think everyone knows the ability "Channel". I've used a lot of channel ability to create my own recipe and shop system. I based the system on a shop hero per player, which moves periodically to the owner's location. It works fine, but to cast the spell, the shop must stay in a place, because the chennel casts. So the player can't buy anything while he's moving. Is there any way to remove this cast effect from the channel? I need something like the windwalk. I tried it, but it doesn't work (i set the order ids to different, but it still casts the last ability only).

Thanks in advance!
 

TomTTT

New Member
Reaction score
44
I'm not sure i got what you asked.
You want to use the ability to make a shop near a Hero when he uses the ability, but you want to make sure he stays in the same place?
Well you can try Pausing him? Maybe set the Follow Through Time to the time the shop appears.
 

luorax

Invasion in Duskwood
Reaction score
67
I've already set it to "Instant (No target)", but the same.

So, imagine a map with heroes, mobs, bosses, etc. Kinda like an RPQ, but with other enemy heroes etc. So, you have a hero. And you have another "hero", what's the shop. If you select the shop, then you're able to buy items. But to prevent that when the player clicks on the portrait of the shop, i made a trigger, which sets the position of the shops to their owner's position.
But because the shops moves every 0.01 seconds, it's unable to cast spells, so it can't sell any items (because the selling is based on abilities, as i said).
my problem is that, when the hero moves, the shop moves too, cancelling its cast. So the hero must stay in a place.
 

TomTTT

New Member
Reaction score
44
Why did you do the selling as Abilities? There's a simple Sold Items part at the Object Editor.
Anyway i don't know. It sounds pretty hard to find this out. (BTW, suggested to use it as 0.03 or more to avoid leaking)
Whats the problem selling as Items?
You don't need to make it a hero so it can sell items.
You can keep it as a shop but make it move. Even if it doesnt have Movement set in OE, Unit - Move UNIT instantly, works with everything.
 

luorax

Invasion in Duskwood
Reaction score
67
Yes, i know that i can move buildings too, but I have added some "extreme" part to my shop system, which requires ability levels. That's why i need abilities. And because i use categories, what use spell books. So another thing why i can't use simple items.

Also, if you can wait a minute, then i could upload some screens, to give you some information about how does it work, and what is my problem.

So, the pictures:
1, http://kephost.hu/image-CCF4_4CE2D83F.jpg
2, http://kephost.hu/image-955C_4CE2D83F.jpg
3, http://kephost.hu/image-7F86_4CE2D83F.jpg
4, http://kephost.hu/image-EB45_4CE2D83F.jpg
5, http://kephost.hu/image-8CB1_4CE2D83F.jpg
6, http://kephost.hu/image-2BAC_4CE2D872.jpg
7, http://kephost.hu/image-CE01_4CE2D872.jpg
8, http://kephost.hu/image-B452_4CE2D872.jpg
9, http://kephost.hu/image-5E25_4CE2D872.jpg

I don't want to insert them as image, because they're ingame screenshots, and i use 1280x1024. But the descriptions:
1, Basically you have this and
2, this. The shop and the spell book, which contains the items' abilities.
3, When you select the shop, you'll see this.
4, After you select a categorie
5, And after the subcategorie. This is the ability, what creates the item, when you use it, calculating everything needed information (gold costs, already bought items, etc)
6, As i said, this's a spell
7, Once you buy it, it appears in the inventory, or in the backpack.
8, But you can use this shop to sell items
9, by pulling the item over the shop.
 

TomTTT

New Member
Reaction score
44
From pictures i got to say - looks nice :D
But i don't see a reason why not making the shop's (as it is now, i guess?) model to none.mdl and make it follow the hero. Anyway you don't do anything while buying, cause you pay attention to it, right?
I'm sorry i just can't seem to find a solution...
(BTW, how many imports did you do? :p)
 

luorax

Invasion in Duskwood
Reaction score
67
The map is now 7,4 Mbytes. I imported a lot of icons, and models, because i need a really own interface for the really own map (i think it's really own - custom gamestyle, and i don't know too much Mortal Kombat Based maps - but i have problems with my pc, so i freezed the project some months ago - but my friend asked me to create some "system" and animation for his map, and we decided to finish my map too [i'm a triggerer, he has really nice ideas, and an english language professor :D]) But i give credit to every known creator in the quests menu, of course.

The following things sound nice, because i think the shop will stop, and cast the spell, it isn't forced to move every 0.04 seconds. I think i'll try it tomorrow.

Thanks for the idea! :D

EDIT: okay, but i forgot about something: to order the shop to follow the hero, the shop needs the ability to move. But now it can't move (the "basic interface" [the categories] isn't a spellbok... that's 8 spellbok + a simple ability with a cancel icon, what selects the hero for the player). And the shop can't have the ability to move, because then i can't add those abilities to it. Hmm, interesting. I have to find out, what else should i use? Because if i use two windwalk (for example - moving doesn't cancel the cast), then it casts the last ability only.
EDIT2: ooh, and i have a lot of imported sounds, because i had to use the original selection sounds, because i made the original selection screen of the mortal kombat games :p
 

luorax

Invasion in Duskwood
Reaction score
67
Okay, news. It works now - there're two line in the object editor (animation backswing/backstab, or something like this), and if they're both 0, the unit'll cast the spell instantly. So now works perfectly. I saw this in Jesus4Lyf's "DummyCaster" library - so thanks to Jesus4Lyf!
 

luorax

Invasion in Duskwood
Reaction score
67
I really don't know. I haven't worked on it for some months. Also, the most ability is completed (there're 14 playable Mortal Kombat Character now - Shao Kahn, and Liu Kang needs an ulti, and i haven't done any fatalities yet), but they need balance, of course. But there's about 6-8 item completed, so i have to create them all. Because there're a LOT OF modifiable things now:
-magic resistance
-magic penetration
-cooldown reduction,
-custom stacking spell crit
-attack crit
-critical damage
-dodge
-spell vampirism,
-life steal,
-item cost reduction [% + "simple"],
-revive time reduction [% + ""simple"]
-and maybe I'll rewrite the spell using the Status, to create buff time modifications (reducing stuns/silences etc. casted on you, and increasing the stuns/silences etc casted by you)
-And the basic things (movement speed, attack speed, life, mana, etc)

And i have to finish the terrain. The most scripting thing is completed, as i said, so the "kombat" is finished, revives, points, etc. Now i got a new friend, whose English is great, and he has really nice ideas (and i also knew his friend, who's a big player too), so maybe i'll finish it. But i can't told you an exact date, sorry.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
though this is solved already you should know that by using the "unit - move unit instantly" GUI action a units current orders and actions will be removed, this is what your problem was.
you could use jass to bypass this. by setting a units X and Y instantly the orders will remain and no problem would occur. might have visual effects for not moveable units though.
 

luorax

Invasion in Duskwood
Reaction score
67
I never use GUI. I've used a timer and a simple loop to loop through the shops, and move them to the correct position. And I've used "SetUnitPosition" to move them to the right position.

This is my loop:

JASS:
function SHOP takes nothing returns nothing
    local integer li = 1
    
    loop
        exitwhen li > 9
        if udg_shop[li] != null then
            if GetUnitState(udg_hero[li], UNIT_STATE_LIFE) >= 0.401 then
                if GetUnitX(udg_hero[li]) != udg_X[li] or GetUnitY(udg_hero[li]) != udg_Y[li] then
                    call SetUnitPosition(udg_shop[li], GetUnitX(udg_hero[li]), GetUnitY(udg_hero[li]))
                    set udg_X[li] = GetUnitX(udg_hero[li])
                    set udg_Y[li] = GetUnitY(udg_hero[li])
                endif
            else
                call SetUnitPosition(udg_shop[li], GetUnitX(gg_unit_n008_0054), GetUnitY(gg_unit_n008_0054))
            endif
        endif
        set li = li + 1
    endloop

endfunction


The variables're global variables (udg - but i try to avoid them nowadays)
 
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