Hello Everyone, i have a problem about doors with switch.
,because the door don,t open (by the destruction of the switch)
Here is my Lua-entry:
(from the switch and the door)
conquest:Start()
OnObjectKillName(PlayAnimRaise, "schalter");
OnObjectRespawnName(PlayAnimDrop, "schalter");
OnObjectKillName(PlayAnimRaise1, "shieldschalter");
OnObjectRespawnName(PlayAnimDrop1, "shieldschalter");
EnableSPHeroRules()
--START BRIDGEWORK!
-- OPEN
function PlayAnimRaise()
PauseAnimation("drop");
RewindAnimation("raise");
PlayAnimation("raise");
end
-- CLOSE
function PlayAnimDrop()
PauseAnimation("raise");
RewindAnimation("drop");
PlayAnimation("drop");
end
PS : All Animations in the Zero-edit done.
What is the problem ? PLs help
Doors with switch Problem
Moderator: Moderators
-
Redline
- 2nd Lieutenant

- Posts: 396
- Joined: Tue Jan 16, 2007 4:22 pm
- Projects :: Space to Ground [reworking]
- xbox live or psn: No gamertag set
- Location: The left side of the moon
- Contact:
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
RE: Doors with switch Problem
Add ShowMessageText("") to your fuctions. Use this to make sure they are getting called. The code should display "[Null]" ingame.
-
Redline
- 2nd Lieutenant

- Posts: 396
- Joined: Tue Jan 16, 2007 4:22 pm
- Projects :: Space to Ground [reworking]
- xbox live or psn: No gamertag set
- Location: The left side of the moon
- Contact:
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Count how many times it is displayed. Note the text will not get displayed, only [Null]. A good run (load -> open once -> close once) would display 6 nulls.OnObjectKillName(PlayAnimRaise, "schalter");
OnObjectRespawnName(PlayAnimDrop, "schalter");
ShowMessageText("Count 1")
OnObjectKillName(PlayAnimRaise1, "shieldschalter");
OnObjectRespawnName(PlayAnimDrop1, "shieldschalter");
ShowMessageText("Count 2")
EnableSPHeroRules()
--START BRIDGEWORK!
-- OPEN
function PlayAnimRaise()
ShowMessageText("Starting Open")
PauseAnimation("drop");
RewindAnimation("raise");
PlayAnimation("raise");
ShowMessageText("Ending Open")
end
-- CLOSE
function PlayAnimDrop()
ShowMessageText("Starting Close")
PauseAnimation("raise");
RewindAnimation("drop");
PlayAnimation("drop");
ShowMessageText("Ending Close")
end
-
Redline
- 2nd Lieutenant

- Posts: 396
- Joined: Tue Jan 16, 2007 4:22 pm
- Projects :: Space to Ground [reworking]
- xbox live or psn: No gamertag set
- Location: The left side of the moon
- Contact:
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
-
Redline
- 2nd Lieutenant

- Posts: 396
- Joined: Tue Jan 16, 2007 4:22 pm
- Projects :: Space to Ground [reworking]
- xbox live or psn: No gamertag set
- Location: The left side of the moon
- Contact:
ShowMessageText("Count 1") I will give this a text , but how ?
Example: Destroy the front door
-- OPEN
function PlayAnimRaise()
ShowMessageText("Starting Open")
PauseAnimation("drop");
RewindAnimation("raise");
PlayAnimation("raise");
ShowMessageText("Ending Open")
end
-- CLOSE
function PlayAnimDrop()
ShowMessageText("Starting Close")
PauseAnimation("raise");
RewindAnimation("drop");
PlayAnimation("drop");
ShowMessageText("Ending Close")
end
Text for this ( ingame )
(also the text Null in the ingame)
Example: Destroy the front door
-- OPEN
function PlayAnimRaise()
ShowMessageText("Starting Open")
PauseAnimation("drop");
RewindAnimation("raise");
PlayAnimation("raise");
ShowMessageText("Ending Open")
end
-- CLOSE
function PlayAnimDrop()
ShowMessageText("Starting Close")
PauseAnimation("raise");
RewindAnimation("drop");
PlayAnimation("drop");
ShowMessageText("Ending Close")
end
Text for this ( ingame )
(also the text Null in the ingame)
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
You will not get the text. I just put it in there so you can better read the code.
This is how its normally used:
ShowMessageText("level.dea1.obj6_ambush3")
The string gets converted into whatever it represents in the localization files. If it doesn't represent anything (you could make a 'Starting Open' entry) it will display Null.
If you can get the error log file, you could use print("your text here") instead. Print will output its text to the error log. ShowMessageText() outputs to the game screen.
This is how its normally used:
ShowMessageText("level.dea1.obj6_ambush3")
The string gets converted into whatever it represents in the localization files. If it doesn't represent anything (you could make a 'Starting Open' entry) it will display Null.
If you can get the error log file, you could use print("your text here") instead. Print will output its text to the error log. ShowMessageText() outputs to the game screen.
