Author Topic: Possible to trigger target mode?  (Read 342 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Possible to trigger target mode?
« on: July 18, 2012, 11:37:57 am »


               Is it possible to - via nwscript

Trigger a client, to enter Target mode?

eg  Im sure all DM's bind ##dm_visualeffect xx xx   of some kind to their toolbar.


I would like to try and create custom powers, that certain players can trigger, via command/macro type input.
But, ideally , it would be targetted.
Eg - Press the chat macro, enter target mode, click on target, and specific script fires on that target.


I dont have the option of creating new feats
I would rather avoid using playertools - as they are already used.
or
If I did create new feats, would I be able to make it a serverside feat.2da  or does the clients need to have that too?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #1 on: July 18, 2012, 12:51:03 pm »


               nope its not, think even nwnx cant do that as this is client-side
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #2 on: July 18, 2012, 01:02:17 pm »


               hmm,
## infront of a chat macro - does this trigger target mode when in non-DM Client.

I know that it does, when you are in DM Client.
I suspect there is some sort of Server Message received and sent when it all happens, meaning it could theoretically be possible to hook it, and then react to it.

eg -
If you do
dm_visualeffect 13 10   while the server is shutdown/crashing  - does your Client turn into target mode?          If it does - then that might suggest it is a client thing.
                   If it does not - then that would suggest that a server message is sent from server to client, to tell it to change into target mode.

And then when you click the target mode cursor on an object, it must send that message to the server, as it is the server that carries out the command after all.

Probably not possible via nwscript.
But I wouldnt discount the possibility of it being do-able via nwnx.
               
               

               
            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #3 on: July 20, 2012, 09:23:52 am »


               ## prefix means that it's a console command.
All console commands are hardcoded in the client, some of them requiring a target. The client then sends the target and command data as numbers, so the server doesn't even know what text you typed in the console.
There is no way for the server to request any data from the client with nwscript or even NWNX. This would require an NWNCX extension.
               
               

               


                     Modifié par virusman, 20 juillet 2012 - 08:25 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #4 on: July 20, 2012, 02:06:17 pm »


               If you assign a targettable feat, say via a player tool, is it possible to trigger that use on the PC using ActionUseFeat?
 That'd be my guess as to a way to do what you're asking.  You'd still trigger it via macro, and that would pass along a variable that the feat would use to determine what effect to apply to the target object/location.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #5 on: July 20, 2012, 02:24:00 pm »


               ActionUseFeat requires to specify target, so not the way to go
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #6 on: July 20, 2012, 08:37:45 pm »


               What about a combination of using the OnPlayerChat event for some type of command that will have the player cast a targetable spell and use the spell hook to just run a script that you typed with the command instead of casting the spell?

Edit: I guess that probably wouldn't work since you'd need the spell to run to get to target someone/something? I don't do much with spells. Just thinking out loud.
               
               

               


                     Modifié par GhostOfGod, 20 juillet 2012 - 07:47 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #7 on: July 20, 2012, 11:03:50 pm »


               Wouldn't it be great if there was a way to do this?

BUT... I think you just need to create a spell or a feat instead, and allow the player to select a target on a per use basis.
               
               

               


                     Modifié par henesua, 20 juillet 2012 - 10:05 .
                     
                  


            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0
Possible to trigger target mode?
« Reply #8 on: July 21, 2012, 01:20:47 am »


               You can just use an instant feat with these commands. Add it to the player's quickbar, then just send a message to the player asking for a target. As soon as the player uses this instant feat, the entered command gets executed.