Read file triggerhack

I would like to see this done.
Getting information from a file:

triggeraction 0,0,gr.getline,filename,linenumber; 

Please do it :slight_smile:

Can do it in GS2 without triggerhacks :stuck_out_tongue:

I can do this, but keep in mind that there will be a delay as to when you get the data. I would have to send it from the server using a shoot event that you would have to listen for in your script.

Sigh. If only sendtext/requesttext worked in v2.22.

no probz nalin. I can just add a .5 delay in my code :slight_smile:

No, no no… Do not do that.

Nalin could do something like this:

triggeraction gr.readline,file,line,client.stringName,weaponName,actionName;

then client.stringName gets the value of the line, and you receive it by:

if (actionName) {
//Do stuff with client.stringName here.
}

Nalin would do that by adding a weapon to the character for one frame that did callweapon to that weapon and that action, wouldn’t you, Nalin? Seems the most practical for the scripter to me.

Yes, I can’t wait for this triggerhack!

If it doesn’t have a cap Ill rejoice when this is done.

No, I would use a shoot trigger. A normal triggeraction has a location. In order to trigger the player, wouldn’t I have to send a triggeraction at the player’s position? What if the server/player is lagging and they aren’t at that position when the packet arrives?

wait… how does using “shoot” fix the problem of lagging position? Based on the commands.rtf file it looks like “shoot” still goes by an x,y location.

I never said anything about triggeractions at all. I said:

“Nalin would do that by adding a weapon to the character for one frame that did callweapon to that weapon and that action, wouldn’t you, Nalin? Seems the most practical for the scripter to me.”

In my own tests the client refuses a shoot packet sent to the player by a non-extant player, so you’d have to fake another player in the room for that to work.

If you started passing information through shoot to the player and the file grew to be in great excess wouldnt that cause major lag eventually? And wouldnt this then have to abide by graals limitations and receive a cap in which case wouldnt it reduce functionality big time?

If you use the method I described you could pass around 13 KB of information without any issues.

sounds good enough :slight_smile:

Hmm. If shoot does have issues, then it seems like temporary weapons would be the only solution.

But you can do it right? please say yes

hmm, could the triggeraction set a client variable? Then you could do something like:

if (playertouchsme) {
  setstring client.fileLine,~!replaceme!~;
  triggeraction 0,0,gr.getline,filename,linenumber;
  timeout = 0.1;
}
if (timeout) {
  if (strequals(#s(client.fileLine),~!replaceme!~)) {
    timeout = 0.1;
  }
  else {
    // process client.fileLine, maybe do more getline's
  }
}

uhmmm I fail to see how that calls of a text file o.0

Was this in response to my post? If so, I was asking if it was possible to make a triggeraction hack set a client variable because then the code that I posted could be used to get the string. Where “client.fileLine” gets modified by whatever black-magic sits behind those 0,0 triggeractions.

Traddles just cannot script for shit.

His idea works just fine, just not as good as our ideas. His would be restricted by a 230-something character cap and the syntax is ugly, while ours has much prettier syntax and a 13kb limit instead of 230 byte limit.