Using KI data

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Using KI data

Postby Rabbit » Tue Apr 19, 2011 8:04 am

I have an amazing idea for a puzzle, parts of which will be unique to each player. I was wondering is it possible to make an event happen or create an algorithim based on the players KI number? The idea being that I would like some basic events in my Age to be unique to each person.

I am using Blender and I am not an expert, but any pointers would be appreciated.
Rabbit
 
Posts: 90
Joined: Fri Jul 25, 2008 11:25 am

Re: Using KI data

Postby Sirius » Tue Apr 19, 2011 8:24 am

There is a Python function to get the player's KI number. Using an avatar type (for example PtGetLocalAvatar()), you should be able to use getPlayerID().

However, I think a ramdom function would be more appropriated. Of course, it is still possible to have two same combinations for two players, but depending on the way you do it, the probability to have two same codes (if you chose codes) is nearly impossible.
User avatar
Sirius
 
Posts: 1111
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Using KI data

Postby Rabbit » Tue Apr 19, 2011 9:15 am

Many thanks for that. I need to experiment and see what works, but I have some excellent ideas brewing I'd like to try out. :lol:
Rabbit
 
Posts: 90
Joined: Fri Jul 25, 2008 11:25 am


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron