Jump to content


Replying to Changing the Teleport Icon


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Miros

Posted 08 July 2018 - 08:33 AM

I ended up creating a dummy ability and linking it with a teleport SCaR code, just like Gambit suggested.

Though probably not the most elegant solution, it works wonders (at least in single player).

Gambit

Posted 02 June 2018 - 06:50 PM

Brother Miros, I have already used something similar (SCaR) for the LotD mod.

In short, I created an ability that spawns a dummy entity, and had the scar de-spawn the squad/entity, and re-spawn it at the place of the dummy entity.

But in LotD, I had only one entity (the HQ) that was using this "teleport" ability.

If that is the case, just have a look at the code there. :grad:

 

But if you want to use it "generally" you must identify the "casting" squad differently.

And this will be tricky. I have some suggestion for that as well, if that is the case.

But yeah, you can always use a SCaR button.


Miros

Posted 02 June 2018 - 06:37 PM

Crap...

Ok thanks a lot anyway.

I believe I will switch to a SCAR ability of some sorts, which should give me more freedom (and some other sorts of headaches too, I bet).

Evil Isador

Posted 02 June 2018 - 06:08 PM

It is hard-coded.

 

I've already tried to change the icon. The only alternative would be to make the original button opaque and create another button with the correct textures behind it. But this leaves the icon in enabled state, when the ability is about to recharge.


Gambit

Posted 31 May 2018 - 10:44 AM

Pretty sure this is a question for brother Evil Isador :grad:

I will PM him.

 

... But I think it is hard-coded...


Industrial_Strength

Posted 31 May 2018 - 12:13 AM

I don't have any as I'm not that "experienced" so to speak.

However, I'll mention it on Discord & such & see if I can't find someone who can help. 🤞

Hopefully I can get some help / input for ya.

Miros

Posted 30 May 2018 - 10:11 PM

Hi!
This is call for help from all you experienced modders out here.

I'm currently developing a race mod (soon to be announced if all goes well), and I'm using the necron "teleport to building" feature (squad_jump_ext with teleport=true and teleport_summon=true)

The thing is, I want to change the way the button looks (not playing necrons, so that doesn't fit).

I first tried with the texture field available in the rgd, but that doesn't seem to work. Same way with title and description.

Editing taskbar.lua (within the frame of FreeUI), on the other hand, seems to work for both title and description, which is nice. The way it works is it binds a modal button and gives it different tooltips depending on what kind of "jump" the unit has. Editing the UCS pointer for teleport_summon does the trick.
As for the texture, there is also a field in there, but it does nothing when changed. My guess is the game pulls it out of somewhere else depending on the modality of the button (jump type), but I haven't been able to find it.

I know this is rather speciffic, but I refuse to believe it's hardcoded.

Any ideas?

Review the complete topic (launches new window)