Results 1 to 5 of 5

Thread: Scripting : How change hintstring when Press button.

  1. #1
    Private Salem75's Avatar
    Join Date
    Mar 2018
    Location
    Toujane , Tunisia
    Posts
    15
    Thanks
    0
    Thanked 9 Times in 8 Posts

    Scripting : How change hintstring when Press button.

    Hi,
    I'll let you now know how change hintstring After press button , for example from ("Press ^2[F]^7 To use") to ("^1Wait")

    PHP Code:
    PHP Code:
    init() 

    lovyshka getent("lov1""targetname"); 
    uselov getent("flov1""targetname");
    k1 getent("lov1kg""targetname"); 
    k2 getent("lov1kr""targetname"); 
        while(
    1
        {
        
    k2 hide();
        
    uselov sethintstring("^2Press [F] to use ");
        
    uselov waittill("trigger"user);
        
    k1 hide();
        
    k2 show();
        
    uselov sethintstring("^1Wait... ");
        
    lovyshka movez(-200,0.3);
        
    lovyshka waittill ("movedone");
        
    wait (10);
        
    lovyshka movez(200,3);
        
    lovyshka waittill ("movedone");
        
    wait (10);
        
    uselov sethintstring("^2Press [F] to use ");
        
    k2 hide();
        
    k1 show();
        } 

    Enjoy !

  2. The Following User Says Thank You to Salem75 For This Useful Post:

    kubislav23 (5th March 2018)

  3. #2
    Private Salem75's Avatar
    Join Date
    Mar 2018
    Location
    Toujane , Tunisia
    Posts
    15
    Thanks
    0
    Thanked 9 Times in 8 Posts
    Notice : You can also use colors .

  4. The Following User Says Thank You to Salem75 For This Useful Post:

    kubislav23 (5th March 2018)

  5. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,725
    Thanks
    17
    Thanked 1,080 Times in 682 Posts
    Test this in developer mode, as it will show you that your strings should be localizedstrings.

    Aside from that, you're not precaching them either.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  6. #4
    Private milepunta's Avatar
    Join Date
    Jan 2014
    Location
    Croatia, Pula
    Posts
    27
    Thanks
    14
    Thanked 26 Times in 11 Posts
    what is the difference if you use localizedstrings or just text in scripts?
    Last edited by milepunta; 6th March 2018 at 00:30.
    As you once said I'm nothing but a monster!

  7. #5
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by milepunta View Post
    what is the difference if you use localizedstrings or just text in scripts?
    You can localize your text (one identifier-string in your code - multiple languages in the game).
    However, you need to precache your localized string in your script (precacheString() iirc) and you have to add your translations in a file, i guess it was somename.localized or sth like that.

    You also could use libcod for that.

  8. The Following User Says Thank You to serthy For This Useful Post:

    milepunta (6th March 2018)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •