 |
Author |
|
 |
|
Poo Bear Pod Team


Joined: 14 Oct 2002 Posts: 4107 Location: Sheffield, UK

|
Posted: Wed Jan 03, 2007 10:18 am Post subject: |
|
|
| I think you just set the sub type to 1, I'll check when I do the editor documentation, but I think its just givePlayer( "ENERGON", "1" ) |
|
|
|
Back to top |
|
|
 |
|
Slyh

Joined: 25 Nov 2004 Posts: 476 Location: Karlsruhe, Germany

|
Posted: Fri Dec 21, 2007 8:46 pm Post subject: |
|
|
| This doesn't work. :( |
|
|
|
Back to top |
|
|
 |
|
Poo Bear Pod Team


Joined: 14 Oct 2002 Posts: 4107 Location: Sheffield, UK

|
Posted: Fri Dec 21, 2007 10:02 pm Post subject: |
|
|
Sorry, I got confused there, I think my memory is failing.
I never actually give Asimov Energon in code in the game. Sometimes I need to make sure he has enough and in that situation I make potentially used up Energon that he's already had reappear when he isn't looking.
Here's some lua from the game:
| Code: |
--is he carrying any?
local enough = false
for i = 6, 100, 1 do
-- extend is the original name for energon
if( playerIsCarrying( "EXTEND", "", false, false, i ) == true ) then
enough = true
end
end
--try and pop some energon back
if( not enough ) then
--search a big volume of room space for objects
data = getFirstDynamicObject( 1, 2, 0, 15, 3, 14, false )
name = getDynamicObjectTypeName( data )
while name ~= "NONE" do -- the last object in our search is always NONE
if( name == "Energon" ) then
sendMessage( data, "SYSTEM", "ACTIVATE", "" ) --make sure it's active and visible
end
data = getNextDynamicObject( false )
name = getDynamicObjectTypeName( data )
end
end
|
|
|
|
|
Back to top |
|
|
 |
|
Zharmad

Joined: 25 Dec 2006 Posts: 95 Location: Sydney, Australia

|
Posted: Sat Dec 22, 2007 12:35 am Post subject: |
|
|
So you can't deactivate the energon by scripting can you?
I would like to do so - I've finished building the repair machinery in my adventure by placing an energon where asimov is standing. I don't really want it there when he first walks into the room though. |
|
|
|
Back to top |
|
|
 |
|
Poo Bear Pod Team


Joined: 14 Oct 2002 Posts: 4107 Location: Sheffield, UK

|
Posted: Fri Dec 28, 2007 8:08 pm Post subject: |
|
|
| No, you can't deactivate energon, sorry. |
|
|
|
Back to top |
|
|
 |
|
|
|
|
|
|