sm0k3
2013-04-17 21:26:57
hey all in process of writing a new script ..
got a little problem though and need some inventive ideas
i would like to create a box around my current location so that i can use pointinbox to keep my player from walking away .. BUT i need to do this anywhere.. in previous scripts i would use sps as its the only way i know to get current location (i hate not having reflection…:( ) …
i do have an idea altho not sure how i can get it to work ,
is there any way i can effectively make a location ie where the player starts is Baselocation
then i can create the box lets say 50x50 width height and if no longer in the box walk back
thing is its a script to be used anywhere so i have to find a way of doing this on the fly..
idea
look for things that stand out on the minimap and make them markers to calculate location relative to them
FindLandmarks(): TVariantArray;
then some kind of way to find a colour that is only seen once or twice on MM
or if theres not a colour thats unique enough use somthing thats size/shape is unique or
only seen once or twice
use whatever is found and give it a name ie the array would contain somthing like
Landmarks[0].Name = Baseloc <-could be a bulding or somthin on MM
Landmarks[0].colour = 113244
Landmarks[0].SizeX = 13
Landmarks[0].SizeY = 11
could be that once the colour is found we check if the colour fits a box with a size of 13x 11y
then once we have filled th array with a few of these " Landmarks " we could then check to see how far away we are from them if we had lets say 3 landmarks we could then Triangulate our relative location on the fly
also if scripters do this while making the script then maby it could be used as a walking method aswell as long as you could find enough unique parts of the map then it should in theory be quite accurate as you can include tol and auto colouring to fight rs changing the colours of things as the would only have to stay at least semi-unique
ive got no idea if this would work but ive been thinking about it for a while and i cant see why not….
so What do people think , if i can get it to work i would release it as an include i guess…
got a little problem though and need some inventive ideas
i would like to create a box around my current location so that i can use pointinbox to keep my player from walking away .. BUT i need to do this anywhere.. in previous scripts i would use sps as its the only way i know to get current location (i hate not having reflection…:( ) …
i do have an idea altho not sure how i can get it to work ,
is there any way i can effectively make a location ie where the player starts is Baselocation
then i can create the box lets say 50x50 width height and if no longer in the box walk back
thing is its a script to be used anywhere so i have to find a way of doing this on the fly..
idea
look for things that stand out on the minimap and make them markers to calculate location relative to them
FindLandmarks(): TVariantArray;
then some kind of way to find a colour that is only seen once or twice on MM
or if theres not a colour thats unique enough use somthing thats size/shape is unique or
only seen once or twice
use whatever is found and give it a name ie the array would contain somthing like
Landmarks[0].Name = Baseloc <-could be a bulding or somthin on MM
Landmarks[0].colour = 113244
Landmarks[0].SizeX = 13
Landmarks[0].SizeY = 11
could be that once the colour is found we check if the colour fits a box with a size of 13x 11y
then once we have filled th array with a few of these " Landmarks " we could then check to see how far away we are from them if we had lets say 3 landmarks we could then Triangulate our relative location on the fly
also if scripters do this while making the script then maby it could be used as a walking method aswell as long as you could find enough unique parts of the map then it should in theory be quite accurate as you can include tol and auto colouring to fight rs changing the colours of things as the would only have to stay at least semi-unique
ive got no idea if this would work but ive been thinking about it for a while and i cant see why not….
so What do people think , if i can get it to work i would release it as an include i guess…