Jump to content

Recommended Posts

Posted

I want to use multiple scripts in my character, but I don't want to change the FPS script. I hope this feature will be added in the future.

Leadwerks / Unity

oknM2Q.png 7N2Gbr.png

 

Thanks Josh.. :)

  • Upvote 1

 

Posted

I experimented with both approaches during development, and I decided to use a single script system because it made the scripting a lot simpler.  With our system you can just check to see if a function exists and call it if it does:

if world:Pick(p0,p1,pickinfo) then
	if type(pickinfo.entity.script.TakeDamage)=="function" then
		pickinfo.entity.script:TakeDamage(10)
	end
end

This greatly simplifies our scripting system and allows different scripted objects to work together more easily.

Let's build cool stuff and have fun. :)

  • Josh locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...