Gamestudio Links
Zorro Links
Newest Posts
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
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 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
is there a way to do this? #137550
06/21/07 21:02
06/21/07 21:02
Joined: Feb 2003
Posts: 264
Michigan,USA
alienheretic Offline OP
Member
alienheretic  Offline OP
Member

Joined: Feb 2003
Posts: 264
Michigan,USA
Example
digits 164,68,"MISSION SUCCESSFULL",menu_font,0,0;
how could i change the "MISSION SUCCESSFULL" part at runtime?

Re: is there a way to do this? [Re: alienheretic] #137551
06/21/07 21:10
06/21/07 21:10
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
I don't think you can change anything inside of a digits element.
However you could use a text object and change the string of it at runtime.

Re: is there a way to do this? [Re: Xarthor] #137552
06/21/07 21:20
06/21/07 21:20
Joined: Feb 2003
Posts: 264
Michigan,USA
alienheretic Offline OP
Member
alienheretic  Offline OP
Member

Joined: Feb 2003
Posts: 264
Michigan,USA
yeah i was trying to avoid that route so i am hoping there is a solution

Re: is there a way to do this? [Re: alienheretic] #137553
06/21/07 21:47
06/21/07 21:47
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
you could re-create the panel?

Code:

panel* my_panel;
string comp_panel_str;

function display_dynamic_panel (str) {
str_cpy (comp_panel_str, "digits 164,68,\"");
str_cat (comp_panel_str, str);
str_cat (comp_panel_str, "\",menu_font,0,0;");

return (pan_create (comp_panel_str)); //returns the new created panel pointer
}

...

if (my_panel) {pan_remove (my_panel);} //if panel already exists, remove first
my_panel = display_dynamic_panel ("lala I am good"); //make new panel and store
my_panel.visible = on; //show panel




well, theoretically this should work... it should display the name on screen when calling the function with the right arguments

Last edited by Jostie; 06/21/07 21:48.

Click and join the 3dgs irc community!
Room: #3dgs
Re: is there a way to do this? [Re: Joozey] #137554
06/21/07 21:56
06/21/07 21:56
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
Hi Vince, dont know if is this what you want but i ran just a test:

string test = "MISSION SUCCESSFULL";

digits(17,40,test,*,1,0);

function change_string()
{
str_cpy(test,"MISSION FAILED");
}

on_1 = change_string;

And it changes in run-time in the panel, now is MISSION FAILED.

Re: is there a way to do this? [Re: demiGod] #137555
06/21/07 22:04
06/21/07 22:04
Joined: Feb 2003
Posts: 264
Michigan,USA
alienheretic Offline OP
Member
alienheretic  Offline OP
Member

Joined: Feb 2003
Posts: 264
Michigan,USA
sweet thanks that helps alot

Re: is there a way to do this? [Re: alienheretic] #137556
06/22/07 00:41
06/22/07 00:41
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Oh, so that works too


Click and join the 3dgs irc community!
Room: #3dgs
Re: is there a way to do this? [Re: Joozey] #137557
06/22/07 12:58
06/22/07 12:58
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Great, didn't know that you could use global strings inside of the digit element
Thanks demiGod

Re: is there a way to do this? [Re: Xarthor] #137558
06/22/07 13:26
06/22/07 13:26
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
me too


Never say never.
Re: is there a way to do this? [Re: tompo] #137559
06/22/07 13:44
06/22/07 13:44
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
No problem Thunder (which new name i cant spell ), we are learning new things everyday, including me.


" If i disappear without say anything thatīs because iīm dead. "

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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