| Author |
Message |
|
Gemini
Chief Warrant Officer
Joined: Mon Mar 08, 2004 3:00 am Posts: 193 Location: Canada
|
In a script where speed is critical, for example in an attack script which is faster? Waitfor or a text trigger?
_________________ A newb meets cit-killa early on day 4:
"1:31:39 AM P zyberi nice...almost had you
1:32:49 AM P zyberi ****ing bullshuit
1:32:56 AM P zyberi and you knwo it your Butt was grass
1:33:35 AM P zyberi you knockign me out set me back ****ign weeks with taht ****
1:34:27 AM P zyberi enjoy teh day you ****ign *****"
|
| Wed Jun 01, 2005 9:31 am |
|
 |
|
Traitor
Lieutenant Commander
Joined: Thu Mar 21, 2002 3:00 am Posts: 890 Location: USA
|
experience tells me they are about the same. I haven't run a speed comparison tho.
i.e.
waitfor "warps into"
settexttrigger killGemini :killGemini "warps into"
are the same for all practical purposes. I think if there was a difference, it would be in the less than 1ms range. Triggers, however, are way more fun to label! [:D]
_________________ http://tw-cabal.navhaz.com - THE TW info site
Man, I gotta quit showing up here...next thing you know i'll get dragged back in.
|
| Wed Jun 01, 2005 1:18 pm |
|
 |
|
Gemini
Chief Warrant Officer
Joined: Mon Mar 08, 2004 3:00 am Posts: 193 Location: Canada
|
Thanks for the info Traitor.
_________________ A newb meets cit-killa early on day 4:
"1:31:39 AM P zyberi nice...almost had you
1:32:49 AM P zyberi ****ing bullshuit
1:32:56 AM P zyberi and you knwo it your Butt was grass
1:33:35 AM P zyberi you knockign me out set me back ****ign weeks with taht ****
1:34:27 AM P zyberi enjoy teh day you ****ign *****"
|
| Wed Jun 01, 2005 1:27 pm |
|
 |
|
Zoso
Ensign
Joined: Fri Sep 19, 2003 2:00 am Posts: 247 Location: Canada
|
Of The 2 examples, which ever comes out to less lines of code is the one I would choose. I'm sure one will be a few lines less than the other. Of course we are still talking fractions of a second.
Zoso
_________________ No Quarter - Is what we offer our enemies
|
| Wed Jun 01, 2005 2:32 pm |
|
 |
|
Gemini
Chief Warrant Officer
Joined: Mon Mar 08, 2004 3:00 am Posts: 193 Location: Canada
|
I went with the waitfors just because it helps me keep better track of what my script is doing, and where it's supposed to be going.
_________________ A newb meets cit-killa early on day 4:
"1:31:39 AM P zyberi nice...almost had you
1:32:49 AM P zyberi ****ing bullshuit
1:32:56 AM P zyberi and you knwo it your Butt was grass
1:33:35 AM P zyberi you knockign me out set me back ****ign weeks with taht ****
1:34:27 AM P zyberi enjoy teh day you ****ign *****"
|
| Wed Jun 01, 2005 2:41 pm |
|
 |
|
RammaR
Warrant Officer
Joined: Sat Dec 15, 2001 3:00 am Posts: 94 Location: USA
|
EP might be able to shed some light on this one, but I tend to use waitFor's like a setTextLineTrigger where I could parse text from the entire line vs a setTextTrigger which activates immediately on 'seeing' the text. The other side of that is that a waitFor doesn't jump to another area of code - it just proceeds to the next line where a trigger might have to jump several thousand lines to proceed. Its an interesting question, maybe we can figure out a way to test it out.
_________________ http://www.grimytrader.com
|
| Wed Jun 01, 2005 8:20 pm |
|
 |
|
Kavanagh
Ambassador
Joined: Wed Feb 28, 2001 3:00 am Posts: 1410 Location: Boo! inc. Ireland
|
If script execution speed has once again become an issue, to the point that milliseconds are relevant (what with some players having 50 ms pings), perhaps people should abandon twx/zoc/anything that is not compiled, and go look at Procomm/Qmodem/Telix again.
|
| Wed Jun 01, 2005 9:38 pm |
|
 |
|
Vid Kid
Commander
Joined: Sun Feb 25, 2001 3:00 am Posts: 1838 Location: Guam USA
|
quote:
If script execution speed has once again become an issue, to the point that milliseconds are relevant (what with some players having 50 ms pings), perhaps people should abandon twx/zoc/anything that is not compiled, and go look at Procomm/Qmodem/Telix again.
I believe this is the right answer ..
the speed of a string of commands is no longer an issue when its
compiled , so with twx the issue would be if its not compiled .. it will take a few milies to compile ..
This being said .. execution times of command ?? really ..hehehe [;)]
_________________ TWGS V2 Vids World on Guam Port 2002 Telnet://vkworld.ddns.net:2002 Discord @ DiverDave#8374 Vid's World Discord
Founding Member -=[Team Kraaken]=- Ka Pla
 Winners of Gridwars 2010 MBN Fall Tournament 2011 winners Team Kraaken Undisputed Champions of 2019 HHT Just for showing up!
The Oldist , Longist Running , Orginal Registered Owner of a TWGS server : Vids World On Guam
|
| Thu Jun 02, 2005 12:07 am |
|
 |
|
Zarkahn
Lieutenant
Joined: Sat Nov 06, 2004 3:00 am Posts: 600 Location: USA
|
hmm, i got a script called Gemini from a pirates game, but it was for Zoc...heh heh
Custom wrote for him...heh heh... the surprise was it worked
_________________ Its not the Kill, Its the Thrill of the Chase
S: Min: 297 Max: 437 Average: 410 -- Just here to attack aliens
S: High/Low Removed Average: 421
|
| Fri Jun 03, 2005 3:42 pm |
|
 |
|
Gemini
Chief Warrant Officer
Joined: Mon Mar 08, 2004 3:00 am Posts: 193 Location: Canada
|
You coming to pirates tonight Zark? I've got a new script I wanna try out. =)
_________________ A newb meets cit-killa early on day 4:
"1:31:39 AM P zyberi nice...almost had you
1:32:49 AM P zyberi ****ing bullshuit
1:32:56 AM P zyberi and you knwo it your Butt was grass
1:33:35 AM P zyberi you knockign me out set me back ****ign weeks with taht ****
1:34:27 AM P zyberi enjoy teh day you ****ign *****"
|
| Fri Jun 03, 2005 7:06 pm |
|
 |
|
Kaboom
Warrant Officer
Joined: Mon Apr 11, 2005 2:00 am Posts: 84 Location: USA
|
I'm not sure about the time differences but I seem to think that text triggers can produce more unwanted results in the development process - especially when you forget that the same text is displayed at times you don't want it to trigger and failed to realize that when you were writing it. But then again, that is probably just a newbie mistake.
KB
|
| Fri Jun 17, 2005 12:01 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
There is no discernable speed difference in the triggering of either type. It would definately be <1 ms, unless you had hundreds of triggers waiting to fire. I would choose to use a waitFor if the next action were definate, instead of conditional. Like if I'm in a solo game, and I'm going to fire at anyone entering my sector, then I would have attack macros immediately following a waitFor. But if I need to see who warped in before I attack, then I'd use a text trigger, since you can control the processing and retriggering more efficiently from a :header.
waitFor "warps into"
send "ay9999*"
goto :checkSector
vs.
setTextTrigger maybePsion :whoDat "warps into"
pause
:whoDat
getWord CURRENTLINE $target 1
if ($target = "PSION")
send "ay9999*"
goto :checkSector
end
# Wasn't Psion, so retrigger and wait.
setTextTrigger maybePsion :whoDat "warps into"
pause
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Fri Jun 17, 2005 5:35 pm |
|
 |
|
Psion
Ensign
Joined: Tue Jan 11, 2005 3:00 am Posts: 297 Location: USA
|
Ouch, hehe.
_________________ --==[The Outfit]==--
Member of The Foundation
Hereby it is manifest, that during the time men live without a common power to keep them all in awe, they are in that condition which is called war; and such a war, as is of every man, against every man. For WAR, consisteth not in battle only, or the act of fighting; but in a tract of time, wherein the will to contend by battle is sufficiently known.
--Hobbes, Leviathan
|
| Fri Jun 17, 2005 7:57 pm |
|
 |
|