How can I make one player hurt another?

Game_makin_FOOL
I need to know how to make one player hurt another. I dont know how to set it up where one player can use a knife on another player...can sum1 please help?

Elexxorine
um.... ok, this might work. command=use knife on #player#. decrease %hitpoints(%playid%)%; 5. that seems right. yeah......

headspace
I sense you were being slightly cheeky to this person

rockyroad
Who are you headspace and why are you wanting cheeky? Is this some kind of strange kinki thing european people do?

Lucy
Hello rockyroad

headspace seems to be something of a character, and may or may not be a troll. I'm going to give him/her the benefit of the doubt, because if they turn out to be okay, they may have the sort of mind that makes terrific text adventures.

Just thought it was worth a little warning just in case a flame war develops.

paul_one
Haha - FLAME WAR!!
*locks topic*

... Erm, well - the british are pretty kinky from what I heard - right up there in the top 5!
But I think it's more him trying to be funny.

Elex wasn't being cheeky.. She just didn't do the guy's work for him, instead helping him out a bit.

headspace
Sorry, misunderstood that one - just thought it was kind of obvious.

Anyway Lucy, I do have a mind that can create things. I'll send you a PM to that effect.

GameBoy
elexxorine wrote:um.... ok, this might work. command=use knife on #player#. decrease %hitpoints(%playid%)%; 5. that seems right. yeah......


You'd have to make sure that %hitpoints(%playid%)% is refering to whatever name the player used for #player#. I guess you could put something like....

%playid% = $id(#player#)$ or something similar.

I've not really looking into ASL scripting for QuestNet, but I know it's a lot different (How you do things).

I've answered this old post since I'm curious about this myself

paul_one
playerid is a build-in quest numeric.

GameBoy
Tr0n wrote:playerid is a build-in quest numeric.

I know, but where Elex put use knife on #player#, whatever is entered in place of #player# is just entered into the player string variable. What to do after that?

I thought it would be #@player#. Then you would put something like...

set numeric <id; $id(#player#)$>
set numeric <health[id]; %health[id]% - $rand(12; 40)$>
msgto <%id%; |b$name(%userid%)$|xb attacked you, causing damage!>
msg <You attacked $name(%id%)$>


Not tested properly, I looked into arena.asl to see how player interaction worked, I'm guessing a basic attacking function would work based on these methods.

paul_one
She's done alot (read: ALOT) of questnet programming - especially on player interaction.

I've done: none... Well, I've done all of 15 minutes with Questnet in total.

ITID is the real person to talk to about this, as he did questnet from the start, and was handing me reams of code a couple of years back.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums