Blow up obstacle that WON'T stay solid....SH/MP map
Moderator: Moderators
Blow up obstacle that WON'T stay solid....SH/MP map
Ok... idiot at work. I'm trying to finish a map off and the last issue is this: I have three 'obstacles' that I want to blow up. All three are set up as 'Allied' only to plant the bombs. Axis cannot defuse. This works fine.
The big problem is that the obstacles are NOT SOLID. No matter what I do. If I make them anything other than a script object, they don't disappear when the bomb goes off. . . in this case they stay solid. If I make them a script/object, they are NOT solid but DO disappear with the bomb blast.
If I clip them and leave them as script/objects, they don't go away. I'm so freaking confused because at one time ONE of them did work properly.
What am I missing? Seems that if I set up the object name as either:
targetname/wire1
or
$targetname/wire1
makes a difference too. I tried to use an entity wire thing, but went to a set of custom brushes...either way it won't work. Is my only option to script each one to remove on the explosion??? I had hoped to find a way around that.
The big problem is that the obstacles are NOT SOLID. No matter what I do. If I make them anything other than a script object, they don't disappear when the bomb goes off. . . in this case they stay solid. If I make them a script/object, they are NOT solid but DO disappear with the bomb blast.
If I clip them and leave them as script/objects, they don't go away. I'm so freaking confused because at one time ONE of them did work properly.
What am I missing? Seems that if I set up the object name as either:
targetname/wire1
or
$targetname/wire1
makes a difference too. I tried to use an entity wire thing, but went to a set of custom brushes...either way it won't work. Is my only option to script each one to remove on the explosion??? I had hoped to find a way around that.
OK>>>>>>>>>>>>> FINE>>>>>>>>>>>>>>>
I used the trusty old '#set' theory and all from your tutorials section and finally got it to work out. Admins, feel free to delete this post. I guess 14 hours straight mapping IS a bad thing....sleep helped work out the bleary eyes and sharpened the brain.....for a couple hours anyway.
I used the trusty old '#set' theory and all from your tutorials section and finally got it to work out. Admins, feel free to delete this post. I guess 14 hours straight mapping IS a bad thing....sleep helped work out the bleary eyes and sharpened the brain.....for a couple hours anyway.
dm_obj.scr
The obj_dm.scr (script used for objective games) has a bad habbit of making script_object targets not solid. If you read it, you'll find this line:
self.target notsolid
The reason they did that is because they expect there to be a collision map (clip brush map) for a model used as the bombs target. I got around it by commenting out the above line and renaming the "obj_dm.scr" script to "obj_dm_tom.scr".
self.target notsolid
The reason they did that is because they expect there to be a collision map (clip brush map) for a model used as the bombs target. I got around it by commenting out the above line and renaming the "obj_dm.scr" script to "obj_dm_tom.scr".
Last edited by tltrude on Tue Oct 14, 2003 6:39 pm, edited 3 times in total.
-
Ramah Palmer
- Warrant Officer
- Posts: 131
- Joined: Sun May 25, 2003 10:13 am
- Location: Nottinghamshire: UK
Ok then, I have this very same problem. It was ok when I only had one bomb objective - my V2 was solid, but since I added another objective the exploders are all non-solid.
So I need one of you two to explain more please.
Slyk, how did you solve it using the #set theory? I have given all my script objects #set values so I dunno what you mean there.
TLtrude: I did a search through the complete MOHAA directory including pk0-pk6.pk3's and I cound not find the dm_obj.scr that you mentioned. Are you sure it is called this? Or am I looking in the wrong place?
Thanks.
So I need one of you two to explain more please.
Slyk, how did you solve it using the #set theory? I have given all my script objects #set values so I dunno what you mean there.
TLtrude: I did a search through the complete MOHAA directory including pk0-pk6.pk3's and I cound not find the dm_obj.scr that you mentioned. Are you sure it is called this? Or am I looking in the wrong place?
Thanks.
Mapping is just INCREDIBLY time consuming.
-
Ramah Palmer
- Warrant Officer
- Posts: 131
- Joined: Sun May 25, 2003 10:13 am
- Location: Nottinghamshire: UK
-
Ramah Palmer
- Warrant Officer
- Posts: 131
- Joined: Sun May 25, 2003 10:13 am
- Location: Nottinghamshire: UK
Ok Tom, so I have REM'ed the not solid line out of the obj_dm.scr file and then saved it as obj_dm_ram.scr but now where do I put it?
If it needs to go in my map\obj directory or the script directory of my .pk3 file, then what is the line I use to call up the script (knowing that 'global' no longer really has any meaning).
If it needs to go in my map\obj directory or the script directory of my .pk3 file, then what is the line I use to call up the script (knowing that 'global' no longer really has any meaning).
Mapping is just INCREDIBLY time consuming.
Sorry
Sorry about that, I wrote it backwards and it has been corrected in my post above. Search in pak0.pk3/global for:
obj_dm.scr
If your create your own version of the obj_dm.scr script, be sure to change the lines in your map's script to match.
$v1_rocket1_explode thread global/obj_dm_tom.scr::bomb_thinker
$v1_rocket2_explode thread global/obj_dm_tom.scr::bomb_thinker
If you are using real models for your V2, my way will not help, because it is for script_object targets of objective games. If you use it, the bounding box of the V2 will turn solid (I think) and you wont get between the fins. It might be better to just use metal clip for your rockets--as they did in objteam2.
obj_dm.scr
If your create your own version of the obj_dm.scr script, be sure to change the lines in your map's script to match.
$v1_rocket1_explode thread global/obj_dm_tom.scr::bomb_thinker
$v1_rocket2_explode thread global/obj_dm_tom.scr::bomb_thinker
If you are using real models for your V2, my way will not help, because it is for script_object targets of objective games. If you use it, the bounding box of the V2 will turn solid (I think) and you wont get between the fins. It might be better to just use metal clip for your rockets--as they did in objteam2.
-
Ramah Palmer
- Warrant Officer
- Posts: 131
- Joined: Sun May 25, 2003 10:13 am
- Location: Nottinghamshire: UK
Ok then, I have some confusion now.
Firstly though, I'm not really bothered about the bounding box on the V2, as I say, it was like that before I added the second objective so I have kind of worked around that already. The second objective however is a control room like in obj_team2. When the bomb blows it takes away part of the wall, but before the bomb blows the wall is non-solid and I can walk through it.
My confusion with the .scr file I have altered is this - obviously I cannot alter the original as then all the maps I have will refuse to work correctly. So I have copied it, amended it and saved as obj_dm_ram.scr
But my question now is where to save it? I cannot save it in the original pk0.pk3 can I? Because how then can I distribute my map when it is done? So where does it go? ANd what is the syntax of the line used to address it? If I do not save it in pk0.pk3 then do I still need the 'global/' part of my script?
I hope you can help me.
Thanks.
Firstly though, I'm not really bothered about the bounding box on the V2, as I say, it was like that before I added the second objective so I have kind of worked around that already. The second objective however is a control room like in obj_team2. When the bomb blows it takes away part of the wall, but before the bomb blows the wall is non-solid and I can walk through it.
My confusion with the .scr file I have altered is this - obviously I cannot alter the original as then all the maps I have will refuse to work correctly. So I have copied it, amended it and saved as obj_dm_ram.scr
But my question now is where to save it? I cannot save it in the original pk0.pk3 can I? Because how then can I distribute my map when it is done? So where does it go? ANd what is the syntax of the line used to address it? If I do not save it in pk0.pk3 then do I still need the 'global/' part of my script?
I hope you can help me.
Thanks.
Mapping is just INCREDIBLY time consuming.
Pk3
Just add a global folder to "main" and place your new script there. When you are ready to make a final pk3, the global folder has to be included--a pk3 is just compressed "main" folder content.
In your main script you should have a couple of "bomb_thinker" lines. They will have to be altered to use your new "obj_dm_ram.scr" script. Something like this:
$controlroom_bomb thread global/obj_dm_ram.scr::bomb_thinker
Just for your info, That line would pass along the name of the bomb to a thread named "bomb_thinker" in a script named "obj_dm_ram.scr" which is in the "main/global" folder.
Hope that helps!
In your main script you should have a couple of "bomb_thinker" lines. They will have to be altered to use your new "obj_dm_ram.scr" script. Something like this:
$controlroom_bomb thread global/obj_dm_ram.scr::bomb_thinker
Just for your info, That line would pass along the name of the bomb to a thread named "bomb_thinker" in a script named "obj_dm_ram.scr" which is in the "main/global" folder.
Hope that helps!
-
Ramah Palmer
- Warrant Officer
- Posts: 131
- Joined: Sun May 25, 2003 10:13 am
- Location: Nottinghamshire: UK
Ok thanks, I'm with you so far but now it's thrown up another problem! (When doesn't it
)
Anyhoos, now that I have created the global directory and put the obj_dm_ram.scr in it my objectives work again. I can set the bombs (which obviously I couldn't before because it didn't know where to look for the script). But the exploders are still not solid. (I have //'ed out the self.target notsolid line). And also now, when both bombs are blown the victory conditions are no longer met for some reason and the round carries on.
Any ideas about these two problems now?
Thanks.
Anyhoos, now that I have created the global directory and put the obj_dm_ram.scr in it my objectives work again. I can set the bombs (which obviously I couldn't before because it didn't know where to look for the script). But the exploders are still not solid. (I have //'ed out the self.target notsolid line). And also now, when both bombs are blown the victory conditions are no longer met for some reason and the round carries on.
Any ideas about these two problems now?
Thanks.
Mapping is just INCREDIBLY time consuming.
Target
In the map the bomb should be targeting the object. But, I would have to see your script because there is more than one way to do the objective set up.
When a bomb goes off, the obj_dm script sets this value which will be used by your main script.
self.exploded = 1
In your main script there should be something like this thread from objteam2.
-----------------------------------------------------------------------------------
allies_win_bomb local.bomb1 local.bomb2:
while (local.bomb1.exploded != 1) // while exploded does not = 1, wait
wait .1
while (local.bomb2.exploded != 1) // while exploded does not = 1, wait
wait .1
teamwin allies // game ends
end
-----------------------------------------------------------------------------------
The obj_dm script assigns the "local.bomb" names to your bombs, so both bombs must use the same obj_dm script. Please post your script and the names you have given to your bombs, and objects that explode.
I hope this is helping, but if you just want it fixed as some as posible, you can send me the map and scripts by e-mail.
When a bomb goes off, the obj_dm script sets this value which will be used by your main script.
self.exploded = 1
In your main script there should be something like this thread from objteam2.
-----------------------------------------------------------------------------------
allies_win_bomb local.bomb1 local.bomb2:
while (local.bomb1.exploded != 1) // while exploded does not = 1, wait
wait .1
while (local.bomb2.exploded != 1) // while exploded does not = 1, wait
wait .1
teamwin allies // game ends
end
-----------------------------------------------------------------------------------
The obj_dm script assigns the "local.bomb" names to your bombs, so both bombs must use the same obj_dm script. Please post your script and the names you have given to your bombs, and objects that explode.
I hope this is helping, but if you just want it fixed as some as posible, you can send me the map and scripts by e-mail.
-
Ramah Palmer
- Warrant Officer
- Posts: 131
- Joined: Sun May 25, 2003 10:13 am
- Location: Nottinghamshire: UK
