Jump to content

[LE] Show script's 'count' number on a message ?


maxarturo

Recommended Posts

I'm trying to figure it out how to display the "Count Number" each time that the script runs, so that the player can have an idea on how many times this function has fire.

I don't know if this is even possible, for a message to retrieve info from the script, but you never know... sombody may have an angle on this.

Link to comment
Share on other sites

Thanks SurfsideNaturals.


But i wasn't clear enough...

I want to display the info on a "Message" and not on a "Debug.Notification", the main reason is that at some point the mod will be translated in 5 languages, and going each time in every single script or making different scripts to display the "Debug.Notification" in that language is a huge pain in the A** !


* Common logic dictates that this can not be done, but you never know...


"can you show me an example of the script?"

I can't because it's an unborn idea, i'm still working all the details in my head before i actually create it.

I always pre design everything in my head and when the actual execution of the idea comes it's all executionable ready and i rarely encounter issues.


Nonetheless, thank you !.

Edited by maxarturo
Link to comment
Share on other sites

Unfortunately this won't work for what i have on my mind...

I need to display from 0 to 100 number and not just 9 numbers.

I think that this can not be done, or i will need to find an other way to do this.



If you are interested in my idea:

- I have some weapons that have as a base idea the "Bloodskal" projectile weapon, but different (projectiles & damages & FXs).


The weapons have different functions that the player can activate each function through a "Modular" he carries in his inventory.


The weapon projectile function runs on batteries in which the batteries are 'filled black soul gems'.


The weapon projectile function has also an option to "overclock" it, making it twice as powerful, but this depletes the soul gem twice faster.


So i need a way to display the number of projectiles fired so that the player knows how many are left before the soul gem is depleted.


* English is not my native language so i don't know if "Modular" is the correct name for this, but this is the last thing that worries me right now.

Link to comment
Share on other sites

This is the text that you would put in your message. - You have fired %.0f projectiles.

Int ProjectilesFired

Message Property MaxMessage Auto


MaxMessage.Show(ProjectilesFired As Float)

I do not see how this requires you to display a 100 different #s at the same time. Even if you did you would just use more messages.

Link to comment
Share on other sites


"I do not see how this requires you to display a 100 different #s at the same time"

Not a the same time.



The idea is that each time the player equips the "Modular" the projectile info message will appear in the left up corner.

Why 100 different numbers.

Each weapon will have the capability of firing 25 or 50 or 100 times before depleting the soul gem > according to which weapon function you choose to run.


Is getting late and my brain is starting to shut down, i will continue this tomorrow, have a pleasant night.


Thank you very much !.

Link to comment
Share on other sites

Yes, it's possible. Increment a global variable and use the tag <Global=GlobalName> in your message. For text replacement, the global variable needs to be added to a quest under 'Quest Data' and also the message needs to be connected to the quest. In your script, use UpdateCurrentInstanceGlobal() each time the variable is updated.

For reference: https://www.creationkit.com/index.php?title=Text_Replacement


Edit - I think the method proposed by surfsidenaturals is even better for this purpose.

Edited by Ghaunadaur
Link to comment
Share on other sites

By using Tes5Edit you'll find some messages which are using something like this "%.0f".
For example:
Skyrim.esm -> JailBedMsg [MESG:0003403D]

    Do you want to serve your time? (%.0f days)

According vanilla script is JailBedScript

 

Scriptname JailBedScript extends ObjectReference  
{hopefully temp script to serve jail time}

  Message Property JailBedMsg   auto
  Faction Property CrimeFaction auto
  {crime faction that owns this jail}

  Int jailTime


; -- EVENT --

EVENT OnActivate(ObjectReference akActivateRef)
IF (akActivateRef == Game.GetPlayer() as ObjectReference)
    ; jailTime = CrimeFaction.GetDaysInJail()
    ; TEMP:

    jailTime = 10
    IF (JailBedMsg.Show(jailTime) == 0)
        Game.serveTime()                    ; Player has served their jail time.
    ENDIF
ENDIF
ENDEVENT

 


Use the script as approach for an own script used for all your weapons to display the projectile info.

If you want to use a more specific output format have a look at this wiki source: https://www.creationkit.com/index.php?title=Show_-_Message

Edited by ReDragon2013
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...