Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Damaged: and ascii strings
Damaged: and ascii strings
2002-11-24, 8:53 PM #1
K, I've never done any work with the jkconcatasciistring() command, and I need help.

In my mod, everything kills in either two or three hits because hey, it's star wars, you don't see them take twenty bullets THEN die, they get hit once, maybe twice, and keel over.

Anyway, because of the realism/coolness factor I'm going for, I'm gonna remove the HUD, and have it print your health/shields each time you get hurt.

Here's my current setup:

Code:
jkstringclear();
jkstringconcatasciistring("Health: ");
jkstringconcatint(getthinghealth(player));
jkstringoutput(-1, -1);


It won't work, and although I'm real good at almost all other aspects of cogging, I'm embarassingly underpracticed in output commands.

I need you guys' help.

See, eventually it will print something like
Code:
       Health: 75       
       Shields: 132


...each time you get hit. I'm working on it. I really feel like this would be Hell Raiser's territory for some reason, but any and all help is appreciated.
2002-11-25, 2:00 AM #2
Dude, grab a copy of the Datamaster [http://forums.massassi.net/html/tongue.gif]

Anyway, change the two parameters on the last line to player, -1 so you don't broadcast to everyone.
-Hell Raiser
2002-11-25, 8:43 AM #3
Well, hmm, it should work. [http://forums.massassi.net/html/confused.gif]

Code:
JKstringclear();
JKstringconcatformattedint(Getthinghealth(Player), "Health:  %d");
JKstringoutput(Player, -1);
JKstringconcatformattedint(Getinv(Player, 60), "Shields: %d");
JKstringoutput(Player, -1);



BTW, I used 'Formattedint' to cut down on the code...
And when the moment is right, I'm gonna fly a kite.
2002-11-25, 10:31 AM #4
Thanks GBK, I'll try it in a minute.

But HR, I told you in the last thread and I'll tell you here: You, personally, sent me a copy of Datamaster over IRC.

It wasn't really that helpful in the usage of the code, I did exactly what it said and it didn't work.
2002-11-27, 2:24 PM #5
Where is the Datamaster?
2002-11-27, 4:02 PM #6
Here.
And when the moment is right, I'm gonna fly a kite.
2002-11-27, 4:46 PM #7
btw, since that should work, you might wanna try looking for syntax errors in other parts of your cog. And get a copy of the Datamaster, it's your best friend. [http://forums.massassi.net/html/redface.gif] [http://forums.massassi.net/html/wink.gif]
-Hell Raiser
2002-11-27, 5:55 PM #8
OMG HR, I was SO pissed untill I saw the smilies.

Anyway, I don't THINK there's a syntax error. I'll have to check though, I'm so inexperienced with this that I accidentally wrote "jkconcatasciistring" untill I noticed what was wrong.

Have yet to try the new way out though, I'm fiddling with saber blocking.

↑ Up to the top!