Author Topic: Making a list of every projectile datablock for use in RTB preferences  (Read 874 times)

What Im trying to do is make an RTB pref that contains a drop-down list of every projectile datablock in the server, similar to the list in the events gui. The idea is for a user to be able to chose the projectile that he wants a certain weapon(To be disclosed at a future date) to fire. I know that this is possible, Im just not sure how to implement it myself. Normally I'd just look at the source code for the wrench, but I obviously cant access it.

Below is the (untested and incomplete) pile of crap code that I have come up with.

Code: [Select]
function datablock::onAdd(%db)
{
if(%db.getType == projectileData)
{
list(projectileList)
{
@ "(%db.uiname)" @

Any ideas?

You could just loop through all of the datablocks once the server starts and check if its in the ProjectileData Class

Couldn't you just make the box type "datablock ProjectileData"

Worth pointing out I'll be adding this variable type in v4 - but you may want to keep looking at alternatives in the meantime.

Worth pointing out I'll be adding this variable type in v4 - but you may want to keep looking at alternatives in the meantime.
Wonderful... except now I know that once I do figure this out all that work was virtually meaningless :/


Couldn't you just make the box type "datablock ProjectileData"
Uh, I dont know, CAN I? ._.

If someone has the sourcecode for the wrench in the old RTB designed for Blocklandv0002, then this would be a lot easier. (I am talking to you in particular, Ephialtes)
« Last Edit: June 14, 2011, 03:49:47 PM by takato14 »

Wonderful... except now I know that once I do figure this out all that work was virtually meaningless :/

Personally, I think it'd be worth the wait, because of this.

Uh, I dont know, CAN I? ._.

If someone has the sourcecode for the wrench in the old RTB designed for Blocklandv0002, then this would be a lot easier. (I am talking to you in particular, Ephialtes)
This is the code for the editor wand tool:

http://dl.dropbox.com/u/11058668/EditorWand.cs

I seriously have no idea where you think that'll get you though.

edit:
Also, takato, calm down. You seem angry.
« Last Edit: June 15, 2011, 12:49:44 AM by otto-san »

This is the code for the editor wand tool:

http://dl.dropbox.com/u/11058668/EditorWand.cs

I seriously have no idea where you think that'll get you though.

edit:
Also, takato, calm down. You seem angry.
I wasnt, actually. Thanks, I'll see what I can do with it.