Thread: mouse coords
View Single Post
  #6  
Old 02-08-2005, 05:18 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally Posted by falco10291029
I did try it, of course, I read the rules. By it should i mean it doesnt but it should and by iof not what am i doign wrong i mean if im wrong assuming this should what is the proper method? But anyway, what i am trying to do is have a summoned monster move to and when close enough attack that coordinate. I couldnty use a triggeractrion or client.string since it's a putnpc2 class npc that gets summoned, so yes any help would be appreciated.
You're talking about some type of monster control I assume? You'll want to have a special weapon set aside for administrating them. Will want to select that monster, and store its id (we'll use the string monsterid for this purpose)
NPC Code:

if (actionserverside){
if (strequals(#p(0),move))
callnpcs strtofloat(#p(1)),move,#p(2),#p(3);
//this will trigger an if (move) statement with the coordinates (triggers the monster)
}

//#CLIENTSIDE
if (mousedown && leftmousebutton && monsterid != -1)
//You'll need to do a monsterid selection system, and set -1 to mean not a monster
triggeraction 0,0,serverside,weaponName,move,#v(monsterid),#v(mo usex),#v(mousey);



That would be the best way to go about it in my opinion. It is best to keep as much of the monster code in the actual monster class, rather than spread it out (Makes it easier for editing and just overall purposes). If you have any other questions ask away (within reason and after evaluating what you're asking )
__________________
Who has time for life these days?
Reply With Quote