| This topic has not yet been rated!
|
You have not rated this topic. Select a rating:
|
|
Author |
Topic: Can you put a delay on getplayerlocation? (Read 113 times)
|
|
Onslaught
|
 |
« on: October 05, 2009, 09:32:10 PM » |
|
"racealias_ftw5" "es est_playplayer server_var(wcs_userid) ambient/atmosphere/cave_hit5.wav;es es_xgetplayername wcs_name server_var(wcs_player);es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_player);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_userid);es es_delayed 3 est_teleport server_var(wcs_player) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2);es es_delayed 3 est_teleport server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1);es es_xtell server_var(wcs_userid) #multi #lightgreenYou will trade places with #green server_var(wcs_name) #lightgreenin three seconds;es es_xgetplayername wcs_name server_var(wcs_player);es es_xtell server_var(wcs_player) :you will trade places with server_var(wcs_name) in three seconds"
Just curious. Reason i ask is the skill switches locations with players, but the thing that's always bothered me is if you use it strategically then jump off a cliff it should teleport them to a falling death...but it gets the location before you jump obviously.
|
|
|
|
|
Logged
|
|
|
|
|
HOLLIDAY
|
 |
« Reply #1 on: October 05, 2009, 10:06:18 PM » |
|
you need to jump then use it
delaying the command is kinda pointless after the delay it will get the original location
|
|
|
|
|
Logged
|
|
|
|
|
Zawmbee
|
 |
« Reply #2 on: October 05, 2009, 11:08:07 PM » |
|
you need to jump then use it
delaying the command is kinda pointless after the delay it will get the original location
Incorrect, if it is delayed it will get the location after x time... Therefore if he had a delay of 3 secs, used the ulti at a person he points at and jumps off all in under 3 secs, it will return a location 3 seconds away...
|
|
|
|
|
Logged
|
(Anyone who C&P's my races, give credit, TY)
|
|
|
|
joshtrav
|
 |
« Reply #3 on: October 06, 2009, 12:20:43 AM » |
|
you need to jump then use it
delaying the command is kinda pointless after the delay it will get the original location
Incorrect, if it is delayed it will get the location after x time... Therefore if he had a delay of 3 secs, used the ulti at a person he points at and jumps off all in under 3 secs, it will return a location 3 seconds away... This is correct. Think of it this way, a delay, is just that... a delay. Whenever you run a delay think in the mindset that the process will wait the exact delay time before executing. es_delay inherently queues a delay function with then queues the command. The only thing that can be an issue is if you want the delay exact, as it will be being other items in the queue but then we are only discussing milliseconds.
|
|
|
|
|
Logged
|
|
|
|
|
Onslaught
|
 |
« Reply #4 on: October 06, 2009, 07:13:11 AM » |
|
I figured i could, just delay doesn't work on a few things. I'll have to try it out. And holliday, to quote the mooninites: Jumping....is useless. Unless i take away the 3 seconds and do immediate switch location, but that pisses people off not being told that they are switching spots. Then again, i usually tell them to f off and buy a necklace.
|
|
|
|
|
Logged
|
|
|
|
|
HOLLIDAY
|
 |
« Reply #5 on: October 06, 2009, 02:21:47 PM » |
|
it just dose not work say you delay es_getplayerlocation 3 seconds then you want to teleport a player to that location after the 3 second delay so you delay the teleport 3.1 seconds GeSHi (eventscripts): est_randplayer wcs_tmp #all es_delayed 3 es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid) es_delayed 3.1 es est_teleport server_var(wcs_tmp) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1)
logically you would think it would teleport a random player .1 second behind you... but it dose not even though the command is delayed it has already run
|
|
|
|
« Last Edit: October 06, 2009, 02:24:50 PM by HOLLIDAY »
|
Logged
|
|
|
|
|
Yiyas
|
 |
« Reply #6 on: October 06, 2009, 04:23:55 PM » |
|
Hmm, did you try putting es in front of est_ aka using "es est_randplayer" Holliday? My apologies if you did, yet wrote that snippet in a rush.
One problem could be that in the way es_delayed normally works is it grabs the variables at the moment the es_delayed is run, which is highly noticeable in poison skills. So to make this work you may have to do an es_delayed 3 racealias_teleport after the getplayerlocation, with racealias_teleport containing simply "es est_randplayer wcs_tmp #all;es est_teleport wcs_tmp wcs_x1 ect"
|
|
|
|
« Last Edit: October 06, 2009, 04:43:40 PM by Yiyas »
|
Logged
|
|
|
|
|
Zawmbee
|
 |
« Reply #7 on: October 06, 2009, 07:05:39 PM » |
|
Hmm, did you try putting es in front of est_ aka using "es est_randplayer" Holliday? My apologies if you did, yet wrote that snippet in a rush.
One problem could be that in the way es_delayed normally works is it grabs the variables at the moment the es_delayed is run, which is highly noticeable in poison skills. So to make this work you may have to do an es_delayed 3 racealias_teleport after the getplayerlocation, with racealias_teleport containing simply "es est_randplayer wcs_tmp #all;es est_teleport wcs_tmp wcs_x1 ect"
that is what I meant, delay a racealias, in which it will have the getplayer and teleport inside it...
|
|
|
|
|
Logged
|
(Anyone who C&P's my races, give credit, TY)
|
|
|
|
Yiyas
|
 |
« Reply #8 on: October 06, 2009, 07:34:15 PM » |
|
Haha  My apologies zawmbee I just clicked "new posts" and read Holliday's one 
|
|
|
|
|
Logged
|
|
|
|
|
joshtrav
|
 |
« Reply #9 on: October 06, 2009, 09:59:35 PM » |
|
Hmm, did you try putting es in front of est_ aka using "es est_randplayer" Holliday? My apologies if you did, yet wrote that snippet in a rush.
One problem could be that in the way es_delayed normally works is it grabs the variables at the moment the es_delayed is run, which is highly noticeable in poison skills. So to make this work you may have to do an es_delayed 3 racealias_teleport after the getplayerlocation, with racealias_teleport containing simply "es est_randplayer wcs_tmp #all;es est_teleport wcs_tmp wcs_x1 ect"
that is what I meant, delay a racealias, in which it will have the getplayer and teleport inside it... This will work, and a year or so ago when we ran .77 our only problem with this was that we had lazily copy/pasta'd a delayed racealias that was also named the same as a race alias on another race. Easy enough to imagine the havoc that had insued when both races were active, LoL. And I wasn't aware it was off topic with python, so my bad.
|
|
|
|
|
Logged
|
|
|
|
|
Onslaught
|
 |
« Reply #10 on: October 06, 2009, 11:54:21 PM » |
|
Wait i thought you couldnt delay a racealias?
What's the syntax for that?
|
|
|
|
|
Logged
|
|
|
|
|
joshtrav
|
 |
« Reply #11 on: October 07, 2009, 12:03:24 AM » |
|
As far as I am aware you can simple call the race alias in a delay.
We did this with some external coding in .77. It required a bit of modification from the WCS core but as far as I remember it is doable.
I recall strongly the issue of the delayed vs standard race alias causing intermittent crashes on our server back then. Had to do with inadvertantly(spelling) creating an infinite loop of race alias call.s
|
|
|
|
|
Logged
|
|
|
|
|
Onslaught
|
 |
« Reply #12 on: Today at 02:03:09 AM » |
|
I swear i tried doing es_delayed x racealias_x and it never worked. I believe I posted on here and they told me it wasn't possible.
|
|
|
|
|
Logged
|
|
|
|
|
|
|