Jump to content

[ Solved ] How do I contact several entities at the same time?


Yue
 Share

Recommended Posts

 have five items that are added to the inventory. These items become invisible. But if the character dies, his inventory is emptied and those five items have to be made visible again to the player.

The idea is to target those five items and make them all visible. I was thinking of something like a ForEach. 

Mars.jpg.89ab63a64eebc1f5ada0ab82b66a1f8c.jpg

 

 

Link to comment
Share on other sites

Solved. 

Function Script:UpdateWorld()
	-- Here variable change + 1.
	if self.collisionEpo == true then 
		self.collisionEpo = false 
		self.Inv.script:AddEpo()
	end 
	if self.entity:GetKeyValue("name") == "KitHealth" then 
		self.entity:Turn(0,0,2)
	elseif self.entity:GetKeyValue("name") == "Epo" then 
			self.entity:Turn(1,1,1)
			
	end

	if player.script.ragdoll == true and self.dead == false  then
		self.dead = true
	end

	if self.dead == true and  player.script.ragdoll == false  then 
		self.entity:Show()
		self.dead=false
		if self.entity:GetKeyValue("name") =="Epo" then 
			self.Inv.script:ResetEpo()
		end
	end
end

 

  • Like 1

Mars.jpg.89ab63a64eebc1f5ada0ab82b66a1f8c.jpg

 

 

Link to comment
Share on other sites

  • Yue changed the title to [ Solved ] How do I contact several entities at the same time?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...