Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Can't get the R Shadow + the W shadow when i swap


Best Answer Asserio , 24 March 2016 - 03:40

With thoose explanations, now that i've understanded how to do the things, it is working. Ty,  :D And i tought getting shadows were more hard.  

OnCreateObj(function(Object)
	if GetObjectBaseName(Object) == "Shadow" then
		WPos = Object
	end
	--PrintChat(string.format("<font color='#00ff00'>CreatedObject= %s</font>",GetObjectBaseName(Object)))
end)
OnDeleteObj(function(Object,myHero)
	if GetObjectBaseName(Object) == "Shadow" then
		WPos = nil
	end
end)
Go to the full post »


  • Please log in to reply
7 replies to this topic

#1
Asserio

Asserio

    Advanced Member

  • Members
  • 254 posts
  • LocationPortugal

There is 2 options for my problem: Or i am dumb, and can't find thoose 2 objects names or riot doesn't create objects with both of them.

I found the name for the W shadow when its sended the first time, but when i swap i can't find the object that it creates. Same for the R shadow. When i ult, i don't see anything like this: Zed_Base_R_cloneswap_buf.troy. This is the code for the first W one: Zed_Base_W_cloneswap_buf.troy. I used this to get the objects.

OnCreateObj(function(Object,myHero)
  PrintChat(string.format("<font color='#00ff00'>CreatedObject= %s</font>",GetObjectBaseName(Object)))
end)

This actualy shows a bunch of objects beign created and that gets confusing knowing what made they appear there.

Is it possible just to print the W objects and the R? That would put things more easy beacause i would test them all until i find the right one Until now i just have this: 

OnCreateObj(function(Object,myHero)
	if GetObjectBaseName(Object) == "Zed_Base_W_cloneswap_buf.troy" then
		WPos = GetOrigin(Object)
	end
	--[[if GetObjectBaseName(Object) == "Zed_Base_Clone_idle.troy" then
		--RPos = GetOrigin(Object)
	end]]
	--PrintChat(string.format("<font color='#00ff00'>CreatedObject= %s</font>",GetObjectBaseName(Object)))
end)

If someone could get me the names, or say me another way of get them i would be grateful.


  • 0

#2
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts
just save the object.. even if you'll swap the object should still exist but the origin will change
  • 0

#3
Asserio

Asserio

    Advanced Member

  • Members
  • 254 posts
  • LocationPortugal

just save the object.. even if you'll swap the object should still exist but the origin will change

Saving? Isn't it beign saved already? What i've tried, that is close to what ur saying was, only using the OnCreateObj so the draws wouldn't dissapear, and they didn't drawn on new shadow after swaping. 

There is a Object name: empty.troy, this name actualy draws on the shadown when i swap, but only when it disappear :fappa:  


  • 0

#4
Asserio

Asserio

    Advanced Member

  • Members
  • 254 posts
  • LocationPortugal

Ok, i think the code on the Vector part is a bit weird but its working  :D a bit buggy tho.

OnCreateObj(function(Object)
	if GetObjectBaseName(Object) == "Zed_Base_W_cloneswap_buf.troy" then
		WPos = GetOrigin(Object)
	elseif GetObjectBaseName(Object) == "Zed_Base_W_cloneswap_buf.troy" then
		WPos = Vector(Object.startPos.x,Object.startPos.y,Object.startPos.z)
	end
	--PrintChat(string.format("<font color='#00ff00'>CreatedObject= %s</font>",GetObjectBaseName(Object)))
end)
OnDeleteObj(function(Object,myHero)
	if GetObjectBaseName(Object) == "Zed_Base_W_cloneswap_buf.troy" then
		WPos = GetOrigin(Object)
	elseif GetObjectBaseName(Object) == "Zed_Skin01_CloneDeath.troy" then
		WPos = nil
	end
end)

  • 0

#5
Deftsu

Deftsu

    donthackourgames

  • Ex-Core Dev
  • PipPipPip
  • 4,812 posts
meh.. instead of storing the pos you have to store the object lol, then it will work when you swap or when you do anything, all you have to do is storing the object (for ex lets make a local var ZedShadow) when the object is created store it in that var, later for drawing circle use DrawCircle(GetOrigin(ZedShadow).....) will follow that shadow wherever it goes
  • 0

#6
Cloud

Cloud

    KAPPA

  • Ex-Staff
  • PipPipPip
  • 1,498 posts

 

Ok, i think the code on the Vector part is a bit weird but its working  :D a bit buggy tho.

OnCreateObj(function(Object)
	if GetObjectBaseName(Object) == "Zed_Base_W_cloneswap_buf.troy" then
		WPos = GetOrigin(Object)
	elseif GetObjectBaseName(Object) == "Zed_Base_W_cloneswap_buf.troy" then
		WPos = Vector(Object.startPos.x,Object.startPos.y,Object.startPos.z)
	end
	--PrintChat(string.format("<font color='#00ff00'>CreatedObject= %s</font>",GetObjectBaseName(Object)))
end)
OnDeleteObj(function(Object,myHero)
	if GetObjectBaseName(Object) == "Zed_Base_W_cloneswap_buf.troy" then
		WPos = GetOrigin(Object)
	elseif GetObjectBaseName(Object) == "Zed_Skin01_CloneDeath.troy" then
		WPos = nil
	end
end)

 

meh.. instead of storing the pos you have to store the object lol, then it will work when you swap or when you do anything, all you have to do is storing the object (for ex lets make a local var ZedShadow) when the object is created store it in that var, later for drawing circle use DrawCircle(GetOrigin(ZedShadow).....) will follow that shadow wherever it goes

So basically what deftsu is saying Wpos = Object this will make WPOS a usable object in any other function that allows usage of object (example, you can then do GetOrigin(WPos) and it will return zed shadow location. )


  • 0

#7
Hanndel

Hanndel

    datebest.net - visit website and win smartphone!

  • Contributor
  • 604 posts
  • Locationhttps://t.me/pump_upp

im pretty sure u dont even need track the object if u know how use vectors Kappa


  • 0

#8
Asserio

Asserio

    Advanced Member

  • Members
  • 254 posts
  • LocationPortugal
✓  Best Answer

With thoose explanations, now that i've understanded how to do the things, it is working. Ty,  :D And i tought getting shadows were more hard.  

OnCreateObj(function(Object)
	if GetObjectBaseName(Object) == "Shadow" then
		WPos = Object
	end
	--PrintChat(string.format("<font color='#00ff00'>CreatedObject= %s</font>",GetObjectBaseName(Object)))
end)
OnDeleteObj(function(Object,myHero)
	if GetObjectBaseName(Object) == "Shadow" then
		WPos = nil
	end
end)

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users