Display Image

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Display Image

Post by Ranakastrasz »

Is it possible to display an image via script without making a dummy entity with that picture, and creating and destroying it as needed?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16


User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Display Image

Post by Ranakastrasz »

I meant like on a particular location on the ground, ideally overlaying the player itself.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Display Image

Post by DedlySpyder »

I don't think so, but what are you trying to do? If you want to overlay the image over the player, maybe create a new player-typed entity (based entirely off the default) with a different picture. Otherwise, if you want it under them, I think you'd have to spawn in a dummy entity (try teleporting it though, that may be easier on performance)

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Display Image

Post by Ranakastrasz »

I am using the teleport method already. It works great in in single player, but in multiplayer the latency issue causes it to lag behind the player.

its a shield bubble animation that pulses when the player takes damage to their shield.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Display Image

Post by DedlySpyder »

Ranakastrasz wrote:I am using the teleport method already. It works great in in single player, but in multiplayer the latency issue causes it to lag behind the player.

its a shield bubble animation that pulses when the player takes damage to their shield.
So the player will have it as long as they have a force shield equipped? 0.13 will add inventory events, so you could make a new player and swap them over when they equip or unequip a shield or power armor with a shield. I don't know exactly how animation layering works, but you could possibly work the force shield into the new player entity

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Display Image

Post by Ranakastrasz »

DedlySpyder wrote:
Ranakastrasz wrote:I am using the teleport method already. It works great in in single player, but in multiplayer the latency issue causes it to lag behind the player.

its a shield bubble animation that pulses when the player takes damage to their shield.
So the player will have it as long as they have a force shield equipped? 0.13 will add inventory events, so you could make a new player and swap them over when they equip or unequip a shield or power armor with a shield. I don't know exactly how animation layering works, but you could possibly work the force shield into the new player entity
New player and swap over? I have no idea how that would work. It would also be potentially happening every tick, so really would be a bad idea anyhow.
Its an animation based on current shield health and how recently it last took damage.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Display Image

Post by DedlySpyder »

Ranakastrasz wrote:
DedlySpyder wrote:...
New player and swap over? I have no idea how that would work. It would also be potentially happening every tick, so really would be a bad idea anyhow.
Its an animation based on current shield health and how recently it last took damage.
Hm, maybe not then, I was thinking like a more generic force field that just shimmered the whole time. I don't think there is a good way to handle it in multiplayer.

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Display Image

Post by Ranakastrasz »

Yea. It works fine already, but lags behind the player in multiplayer.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2125
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Display Image

Post by Ranakastrasz »

Added the video for the existing mod. so the problem is obvious.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Post Reply

Return to “Modding help”