Sending warnings

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Sending warnings

Post by ficolas »

Sending warnings like when an entity is damaged or destroyed and when turrets shoot the enemy would be nice in some situations, like to send a warning when a boiler is destroyed in my mod :)
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Sending warnings

Post by FreeER »

Well the player will automatically get a warning (in the lower right and on map) when a player-force entity is damaged by the enemy force, the player is also notified in the same way when turrets shoot. Not certain if called .die() raises a warning but you could simply damage it once and then call die.
If you are wanting a different way of warning the player on damage you could easily use a print statement with entities name (localized) and it's position. Not sure if there would be any easy way for when turrets fire though.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Sending warnings

Post by ficolas »

I mean a way of sending the warning with different text and maybe different images
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Sending warnings

Post by FreeER »

If you want to send images you are limited to either game.showmessagedialog (requires pressing tab to acknowledge) or maybe creating an entity with that image and creating it near the player (but make sure you avoid any belts)...
If I'm still not understanding want you want (and I'm not entirely sure that I am), then please post a specific example of what you'd like to achieve.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Sending warnings

Post by ficolas »

Do you know how damaged entities/destroyed alerts are shown? I want a way of sending similar alerts but with different text...
(this is a modding interface request no modding help)
Post Reply

Return to “Implemented mod requests”