About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
WE parameters
Author Message
Dynad Offline
Member

Post: #1
WE parameters
Hi,

Is it possible to edit values parameters with code? Like 08 - Custom Parameters its only reading.


Thnx,
~Dynad

There is always evil somewhere, you just have to look for it properly.
03-14-2010 10:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: WE parameters
objects in world editor?
you can do that in professional license - programmable world editor.

or objects in game only?
03-14-2010 10:58 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #3
RE: WE parameters
well let me explain it little better.

u can use:
Game::Param *par=obj.findParam("name" ))Set(name ,par->asStr()

To read the parameters from the objects and use them... is it possible to change the value itself?

Like some object has 100 health, when it got hit i can change it to 50 eg.

Or do i have to make for every object in the game a different class to specify it?

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 03-14-2010 11:38 PM by Dynad.)
03-14-2010 11:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: WE parameters
obj.findParam("name" ))

this can be accessed only at object creation stage

you must store custom values in custom classess
03-14-2010 11:46 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #5
RE: WE parameters
Hmm ok ill do it that way.

Another question, is it possible to link objects in the WE to each other.... i want to make houses destructive so what i can do is make the walls separated and link those to the house so when all the walls are blown out the house collapses. (like bad company 2)

Other choice is make a house broken in 3dsMax and when hit those objects in range breaks and create for every object a Phys obj from the mesh parts.

Dunno which 1 is the best way to accomplish this...

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 03-15-2010 01:41 AM by Dynad.)
03-15-2010 01:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #6
RE: WE parameters
Any idea is appreciated wink

There is always evil somewhere, you just have to look for it properly.
03-15-2010 12:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: WE parameters
Quote:Another question, is it possible to link objects in the WE to each other....
there is no built-in function for that,

you'd need to experiment a little.

Quote:Other choice is make a house broken in 3dsMax and when hit those objects in range breaks and create for every object a Phys obj from the mesh parts.
this sounds good.

you'll need separate objects, each with its own mesh/phys
03-15-2010 02:13 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #8
RE: WE parameters
Is it possible to save multiple objects as 1 in the WE but they stay separated?


for example i have 2 objects and save them as 1 so i can use it again so i don't have to combine those 2 every time i need it.

There is always evil somewhere, you just have to look for it properly.
03-15-2010 08:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: WE parameters
you can save the 2nd object as the sub-object of the first one ("Add Object" in the object properties) and then handle properly updating and drawing
03-15-2010 09:09 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #10
RE: WE parameters
OK that will work indeed...

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 03-17-2010 12:14 AM by Dynad.)
03-15-2010 11:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Sarrene Offline
Member

Post: #11
RE: WE parameters
This brings up a question for me also. I have not gotten this far yet myself, but I thought I would still ask. Just in case it can help either Dynad and or myself.

Does the engine support the standard collada format for "breaking" items or triggered items with animations attached?

We have used these before for realistic object interactions, including destructible buildings. We would create a structure, lets saw a tower, made of several parts. (The parts that we would want to appear to break to the player.) Each part is connected via a node that has a trigger script attached to it and each has a "level" (I cannot think of the actual word off hand right now, im very tired).

So each piece or part of the tower has its parts name, and that part name is linked to the destruction scripts.

So lets say tower 1 needs to have 500 points of damage for piece one to "fall off". Part 2 requires 1000 points of damage to "fall off" and so on.

Not sure if this makes any sense or even applies here. But I hope you two can make some heads or tails out of it. Im sorry im not a coder, I only know from the graphic side of things and how we made our items and tagged and/or named parts that we needed to. I feel really stupid when it comes to coding. (You guys are the smart ones.)


Peace,
Sarrene'
03-16-2010 01:55 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #12
RE: WE parameters
Hello,

Collada format can be used to import the model into Mesh Editor.

Any "breaking" the model should be programmed manually in the C++ codes.

You should play around with mesh parts, actors, joints, physical bodies classes.
03-16-2010 05:18 PM
Find all posts by this user Quote this message in a reply
Sarrene Offline
Member

Post: #13
RE: WE parameters
Aye, that is what I had thought from using the import function already. Now, to achieve something like this, our coder would have to add in the code for each and every object with in each asset we wish to be "broken"?

Sorry for the hijack, but Dynad's post brought up a few questions from what he had asked and the tut solution he had working. smile
03-16-2010 09:59 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #14
RE: WE parameters
I have a small question...

House *item=CAST(House,phys_hit.obj);

when i use this its always negative. the house struct inheritance from Game::Static

but the if(phys_hit.obj) is positive when i click on a house obj.

i need the cast cause there are variables that i need from the struct House to access.

and i use this in the Bool update(); function dunno why it isn't working

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 03-17-2010 01:29 AM by Dynad.)
03-17-2010 12:10 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #15
RE: WE parameters
Quote:Now, to achieve something like this, our coder would have to add in the code for each and every object with in each asset we wish to be "broken"?
That depends purely on how your programmers will implement this functionality, by making a helper tool for processing mesh, or by programming this universally, that depends on your programmers.
I will be working on a similar functionality, I'd like to achieve something like this - http://www.youtube.com/watch?v=WuV6wGnmI...re=channel
however this is will be implemented in the future, right now im focusing on adding dx10,dx11 support.
If you have any specific ideas which you'd like to include when I'll be working on the destruction system, please add your ideas into "Feature Request" section so I could look at them (ideas, images, videos can help).

Quote:House *item=CAST(House,phys_hit.obj);

when i use this its always negative
you must have done something wrong, CAST is just a regular C++ dynamic cast.
perhaps youre testing encountered different object.
you should use debugging, it will automatically tell you which class is the obj, just hold your mouse cursor on the .obj member in debug mode
03-17-2010 03:30 PM
Find all posts by this user Quote this message in a reply
Post Reply