Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, Ayumi), 702 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Dialog Script [Re: cro_games] #225754
09/05/08 22:18
09/05/08 22:18
Joined: Sep 2008
Posts: 25
D
darkkingdom Offline OP
Newbie
darkkingdom  Offline OP
Newbie
D

Joined: Sep 2008
Posts: 25
Oh ok well, thanks for your help.^^
Can anybody help me I need this script very much.

Oder auf Deutsch:
Kan mir sonst noch wer helfen?^^

Re: Dialog Script [Re: darkkingdom] #225787
09/05/08 23:36
09/05/08 23:36
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
Yes man I can help you but I don't get your problem..


Hello everyone my name is Ivan Mandic from "Frozen pixel studio". wink
-----------------------------------
Homepage: www.fpx-studio.com
e-mail: emu_hunter_1990@hotmail.com
(working on a game engine)
Re: Dialog Script [Re: cro_games] #225844
09/06/08 10:55
09/06/08 10:55
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
It works now:

Code:
font standard_font= "Arial",1,20;

string npc1_str ="1.text";
string npc2_str ="2.text";
string npc3_str ="3.text";
string npc4_str ="4.text";
string npc5_str ="5.text";

text npc_txt
{
    layer = 22;
    pos_x = 0;
    pos_y = 300;
    font = standard_font;
    strings = 5;
    string = npc1_str; 
     flags = d3d;
   
} 

function npc_talks()
{
 while(1)
 {
      if (my.skill12 == 1) {npc_txt.string = npc1_str;} 
      if (my.skill12 == 2) {npc_txt.string = npc2_str;}  
      if (my.skill12 == 3) {npc_txt.string = npc3_str;} 
      if (my.skill12 == 4) {npc_txt.string = npc4_str;} 
      if (my.skill12 == 5) {npc_txt.string = npc5_str;} 
      
      if (my.skill12 > 5) {my.skill12 = 0;}
 wait(1);
 }
} 



function sprechen()
{
npc_txt.visible = on;
if (my.skill12 < 6) {my.skill12 += 1;}       
}   


action npc1
{
    npc_talks();//call this function only from this action 
    clip_size = 0;
    while (1)
    {
        
        temp.x = player.x - my.x;
        temp.y = player.y - my.y;
        temp.z = 0;
       
        
        
        my.skill10 = vec_dist(my.x, player.x);
        if (my.skill10 < 50) 
        {
             if (my.skill11 == 0)
            {
                npc_talks();
                my.skill11 = 50;
            }
        }
        else
        {
             my.skill11 = 0;
        }

        if(vec_dist(my.x,player.x)<500)//you need to set vec_dist that you want
        {
        if(key_l == 1)
        {
        sprechen();//call this function from action
        while(key_l == 1){wait(1);}
        }
        }
        else
        {
        my.skill2 = 0;
        npc_txt.visible = off;
        }
      
        wait (1);
    } 
}


Last edited by cro_games; 09/06/08 10:55.

Hello everyone my name is Ivan Mandic from "Frozen pixel studio". wink
-----------------------------------
Homepage: www.fpx-studio.com
e-mail: emu_hunter_1990@hotmail.com
(working on a game engine)
Re: Dialog Script [Re: cro_games] #225863
09/06/08 13:07
09/06/08 13:07
Joined: Sep 2008
Posts: 25
D
darkkingdom Offline OP
Newbie
darkkingdom  Offline OP
Newbie
D

Joined: Sep 2008
Posts: 25
I thank you so much. It works perfekt.

Re: Dialog Script [Re: darkkingdom] #225869
09/06/08 13:54
09/06/08 13:54
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
No problem man,any time..


Hello everyone my name is Ivan Mandic from "Frozen pixel studio". wink
-----------------------------------
Homepage: www.fpx-studio.com
e-mail: emu_hunter_1990@hotmail.com
(working on a game engine)
Page 2 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1