|
[Free] Attach Items - Demo & Script
#125945
04/24/07 01:47
04/24/07 01:47
|
Joined: Sep 2003
Posts: 281 Arkansas\USA
raiden
OP
Member
|
OP
Member
Joined: Sep 2003
Posts: 281
Arkansas\USA
|
I wrote the script to use for multiple types of items. I also coded a behavior panel able to customize settings. In the behaviour panel, you can check to make the item spin before you pick it up, you can set a health variable, and you can tweak the x,y,z & pan,tilt,roll of the item. Pros: The items correctly move with players vertex position and angles. Cons: The items become passable upon picking up, so they can penetrate walls. Demo and Script There is a read me and screenshot about the behaviour panel in the folder. Just include objects.wdl in your script and start carrying stuff around.  Credits are always cool, hope this helps you out. -raiden
"It doesn't matter if we win or lose, it's how we make the game."-------------------- Links: 3DGS for Dummies
|
|
|
Re: [Free] Attach Items - Demo & Script
[Re: vlau]
#125947
04/24/07 11:47
04/24/07 11:47
|
Joined: Sep 2003
Posts: 281 Arkansas\USA
raiden
OP
Member
|
OP
Member
Joined: Sep 2003
Posts: 281
Arkansas\USA
|
Glad you like it.
You can get to the offsets by right clicking on your object in wed and choosing Behaviour. You will see a menu come up where you can tweak the values to position the x,y,z or pan, tilt, roll. This allows you to adjust your object to your player specifically where you want it.
-raiden
"It doesn't matter if we win or lose, it's how we make the game."-------------------- Links: 3DGS for Dummies
|
|
|
Re: [Free] Attach Items - Demo & Script
[Re: Thracian]
#125950
04/25/07 01:02
04/25/07 01:02
|
Joined: Apr 2004
Posts: 516 USA
Trooper119
User
|
User
Joined: Apr 2004
Posts: 516
USA
|
Seems for a great bit of code, thanks a lot bud.
A clever person solves a problem. A wise person avoids it. --Einstein
Currently Codeing: Free Lite-C
|
|
|
Re: [Free] Attach Items - Demo & Script
[Re: Blink]
#125953
05/12/07 04:39
05/12/07 04:39
|
Joined: Sep 2003
Posts: 281 Arkansas\USA
raiden
OP
Member
|
OP
Member
Joined: Sep 2003
Posts: 281
Arkansas\USA
|
The key thing is you must have your character that is picking up the object as the "player" entity, meaning that your player code must have:
player = me;
The carryItem action in the script you attach to your objects to be picked up by the player depends on this to update its position.
So make sure you character player code has the player=me; in its action, and then assign the carryItem action to the object you want to be picked up by your player, rebuild entities and your good to go.
Also in the demo folder there is a screenshot of the behavior panel so you know what it looks like before you call it up in wed.
Let me know if you have anymore problems.
-raiden
"It doesn't matter if we win or lose, it's how we make the game."-------------------- Links: 3DGS for Dummies
|
|
|
|