Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, degenerate_762), 1,430 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Dialog Script #225272
09/03/08 19:32
09/03/08 19:32
Joined: Sep 2008
Posts: 25
D
darkkingdom Offline OP
Newbie
darkkingdom  Offline OP
Newbie
D

Joined: Sep 2008
Posts: 25
Hallo ich bin neu.
Ich habe ein Dialog Script das aber einfach nicht klappen will.

Das hier ist es:

Code:
 font standard_font= "fontsmal.bmp", 10, 10;
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;
   
} 





action npc1
{
    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;
        }
        wait (0);
    } 
}



function npc_talks()
{
      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 -= 5;}

      npc_txt.visible = off;
     

} 


function sprechen
{

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


Es war so gedacht das man vor einem npc stehen muss dan L drücken soll. Dan soll der 1.text erscheinen. Durchen ein weiteres mal vom drücken von L soll text 1 verschwinden und der 2. text angezeigt werden.Dan durch ein weiteres mal von L drücken soll 2. text verschwinden und der 3. text angezeigt werden usw.

Blöder weise kommt da immer: "Empty Poniter in Sprechen: (my.skill12<5)" und "Empty Poniter in Sprechen: my.skill11+= 1;". Ich hab ewig dran rum gefumelt aber konnte es nicht lösen könnt ihr mir helfen?
Danke

Re: Dialog Script [Re: darkkingdom] #225284
09/03/08 20:27
09/03/08 20:27
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
You can use "skill" only with action,try this:

Code:
font standard_font= "fontsmal.bmp", 10, 10;
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 -= 5;}

      npc_txt.visible = off;
 wait(1);
 }
} 


function sprechen()
{
npc_txt.visible = on;
if (my.skill12 < 5) {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(key_l == 1)
        {
        sprechen();//call this function from action
        }
        wait (1);
    } 
}





Last edited by cro_games; 09/03/08 23:11.

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] #225293
09/03/08 20:53
09/03/08 20:53
Joined: Sep 2008
Posts: 25
D
darkkingdom Offline OP
Newbie
darkkingdom  Offline OP
Newbie
D

Joined: Sep 2008
Posts: 25
Thanks but if I start the game the failure:"nonexistent/empty function whiel" came. And thanks for the answer^^

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

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
ups,sry.. "while" laugh..But it works..


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] #225321
09/03/08 23:35
09/03/08 23:35
Joined: Sep 2008
Posts: 34
Bloodangel Offline
Newbie
Bloodangel  Offline
Newbie

Joined: Sep 2008
Posts: 34
Ok it works thanks. But sory the texts is much too quickly played without stop.
Waht can I do?

Re: Dialog Script [Re: Bloodangel] #225325
09/04/08 00:45
09/04/08 00:45
Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
cro_games Offline
User
cro_games  Offline
User

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
Replace "function sprechen()" with:

Code:
function sprechen()
{
npc_txt.visible = on;
if (my.skill12 < 5) {my.skill12 += 0.01;}//speed 0.01       
}   




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] #225554
09/05/08 03:44
09/05/08 03:44
Joined: Sep 2008
Posts: 25
D
darkkingdom Offline OP
Newbie
darkkingdom  Offline OP
Newbie
D

Joined: Sep 2008
Posts: 25
Ok thanks it works to for me to.
But you should actually before the npc and l must press for the 1.text to show.
Whom you should again expresses l 2. Text to be displayed, etc.

Sory for my bad englisch^^

Re: Dialog Script [Re: darkkingdom] #225597
09/05/08 09:02
09/05/08 09:02
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 "function spechen()" is before "action npc1"..Other i didn't get..sry


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] #225684
09/05/08 18:47
09/05/08 18:47
Joined: Sep 2008
Posts: 25
D
darkkingdom Offline OP
Newbie
darkkingdom  Offline OP
Newbie
D

Joined: Sep 2008
Posts: 25
I'm sorry I do not know what you mean. "function spechen ()" is already before the "action npc1" have been.

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

Joined: Sep 2007
Posts: 761
Hrvatska (Croatia ), Slavonski...
nvm..


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 1 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