Game caches.. (how to store a unit? :S)

Potatisbil

New Member
Reaction score
6
ok...so i've tried using :
Code:
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to moo 
    Actions
        Game Cache - Store (Triggering unit) as Muu of Category in (Last created game cache)
        Game Cache - Restore Muu of Category from (Last created game cache) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 0.00
But it doesnt seem to work... can any kind soul out there help me? :>


My intention is to just to make a copy of a unit..

EDIT: i meant i want to make an exact copy of a Hero :p
 
P

Pawnable

Guest
.... why do game caches?

Code:
Actions
  Set unit[0] = Moo
  Set tempPoint = (Position of (Casting Unit))
  Unit - Create 1 unit[0] at tempPoint facing 0.0
  Set unit[0] = No unit
  Custom Script:     call RemoveLocation(udg_tempPoint)
 

jonadrian619

-___-
Reaction score
242
Game Caches? maybe you could read my thread about a full tutorial of making game caches. Search the World Edit Helpzone and look for 'game cache tutorial. That could help.


Maybe you could read this:

Game Cache Actions
Here are the actions of the Game Cache category which are shown in the trigger editor. To create a Game Cache action, click the New Action (Hotkey Ctrl+R) button and click a 'Game Cache - ' Action. Each action has useful details and examples.


Game Cache - Create Game Cache
- Creates a new Game Cache from a map. The Game Cache should be created from your map. Type the map filename in the 'MapName.w3v' field value and change it to your map's filename. The game cache should be from your map so that it's functions will work properly. If the map filename you have typed does not exist, the cache will be created.

Game Cache - Save Game Cache
- Saves the game cache, using the same filename from which it was created. If you use the Actions; Store Integer,Boolean, Unit, etc., then using the Save Game Cache action will save those objects and are available for restoration.

Game Cache - Store Unit
- Stores unit as a Label in a Category in an existing Game Cache. 2 ways to select a unit. First select a function like last created unit, picked unit, etc. Or to store a particular unit, select a unit in the map then use the unit's variable in the field (ex. Peon 0015 <gen>).
"Store Unit" Field Values
- Store Unit (The field wherein your selected unit will be stored) as Label (The unit's label in a category. You can type any) of Category (The category wherein the label will be saved) in (Last Created Game Cache). You can also change it's value like a Game Cache variable or simply last created game cache.

Game Cache - Store Real
- Same as 'Store Unit' but more different. You'll have to store a Real number this time. A Real number is a decimal (ex. 1.00, 1.25, 2.79, etc.).
"Store Unit" Field Values
- Same as the 'Store Unit' fields, but the object stored is a Real number this time. Also create individual categories for the values.

Game Cache - Store Integer
- Same as 'Store Unit' but much more different. You'll have to store an Integer this time. An Integer is a non-decimal or plain number. (ex. 1, 2, 3, 4, 5, etc.).
"Store Unit" Field Values
- Same as the 'Store Unit' fields, but the object stored is an Integer this time. Also create individual categories for the values.

Game Cache - Store Boolean
- Same as 'Store Unit' but much more different. You'll have to store a Boolean value this time. A Boolean value is a value that associates with events and conditions. (ex. 'A unit enters Region 001' then follows the condition 'Triggering unit is a Hero equal to True'. The Boolean value is set to true, so the unit that enters Region 001 should be a hero. If the condition is met, then the actions will be initiated).
"Store Unit" Field Values
- Same as the 'Store Unit' fields, but the object stored is an Integer this time. Also create individual categories for the values.

Game Cache - Restore Unit Facing Angle
- Restores a unit 'Label' from a created Category in a game cache. This action restores or loads a stored unit for a player in a region facing a particular facing angle. The angle is shown in degrees.

Game Cache - Restore Unit Facing Point
- Same as the 'Restore Unit Facing Angle' action. But the unit loaded this time faces a region, not the facing angle itself.

Game Cache - Reload All
- Reloads all game cache from the computer's disk.

Game Cache - Clear Game Cache
- Clears all labels of all categories in a game cache.

Game Cache - Clear Category
- Clears all labels of a specific category in a game cache.
 

mase

____ ___ ____ __
Reaction score
154
Code:
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to moo 
    Actions
[indent]Game Cache - Create Cache as Units with Category of Category
[indent]Set gamecache = Last Created Cache
        Game Cache - Store (Triggering unit) as Muu of Category in (gamecache)
        Game Cache - Restore Muu of Category from (gamecache) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 0.00
There was no created cache... And as pawnable said, why use cache?
 

Potatisbil

New Member
Reaction score
6
I've edited now, made a little mistake in the post first :p my intention was to make a copy of a hero unit(same lvl,items and suck)

But the problem must be that i forgot to create the game cache.... :banghead:
gah... thanks :p

EDIT: worked now :p

Oki, i'll follow yer advice Sfilip :p
~Potatisbil
 

SFilip

Gone but not forgotten
Reaction score
634
Do not make the game cache every time. Its supposed to be done only once, on Map Initialization.
 
General chit-chat
Help Users
  • 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