Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How I could add the name of player in the avatars. #148288
08/16/07 08:06
08/16/07 08:06
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
Hello,

I am creating one multiplayer game but I would like to know how I could add the name of player (user) in some part of avatar(model) dinamically (through one string)? this name of player will be to identify the player in the game.
Anyone has some suggestions?
Thanks

Re: How I could add the name of player in the avatars. [Re: amadeu] #148289
08/16/07 08:46
08/16/07 08:46
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
Oui, but not tested

Code:

function nameEntities(name)
{
while(1)
{
vec_set(temp,my.x);
temp.z += 480; // play with this man
trace_mode = ignore_me+ignore_models+ignore_passents;
if(trace(my.x, camera.x)==0)
{
vec_to_screen(temp, camera);

draw_text(my.string1,temp.x,temp.y,vector(255,255,255));
}
wait(1);
}
}

// in player action
my.string1 = "Player1";
nameEntities(my.string1);




Re: How I could add the name of player in the avat [Re: demiGod] #148290
08/16/07 14:24
08/16/07 14:24
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
Hallo

thanks. it works but I want that the name of avatar appear in 3D scenario not on the screen (2D). Do you have some solution?

thx

Amadeu

Re: How I could add the name of player in the avat [Re: amadeu] #148291
08/19/07 12:59
08/19/07 12:59
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Break the string into letters , create models for every letter and check if the first letter is A , create the model of the letter A at the possition you want , then check the second letter and create the second letter.
If you have a picture(sprite) in the 3D world and you want the name of the player written in there use pixel drawing over a bmp image. Check in the manual for this.

PS.: Its hard to do theese two things if you are new to C-Script , so if you are , I suggest you try more simple ways , like a 'text' or draw_text command.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201

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

Gamestudio download | 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