HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

switching guns

06-19-2004, 11:04 PM#1
DoN_Rpg
ok i need help doing this trigger cause it keeps screwing up on me....i need it so that when a hero picks up an item, say a desert eagle, then the unit turns into a hero with a desert eagle and retains level, but the other team cant do this...like if someone from the other team (terrorist) tries to pick up a desert eagle nothing happens and the weapon is automatically dropped...here is how my trigger looks

Event:
unit aquired an item.
Condition:
item type of item being manipulated equal to desert eagle.
unit is a hero equal to true.
unit type of hero manipulating item is terrorist equal to false.
Action:
unit replace hero manipulating item with desert eagle hero.
if hero manipulating item is level 2 then do set level of last replaced unit to level 2. (i do that if then else action with level 3, 4, 5 and so on)

now the problem im having is that terrorists can still change into desert eagle guys...its like it completely ignored the condition...another thing is that every time u pick up a gun it makes 2 of u instead of just replacing u...and i have a trigger so that if the terrorist does pick up a gun he automatically drops it as well....these 3 things arent working....i was thinking its just a memory leak because there is no reason this should be happening.....can someone post maybe a better way to do this trigger or a way to debug memory leaks?
06-19-2004, 11:17 PM#2
johnfn
Well for it making two of you just unit - remove the old one and put the new unit in its place. Secondly, I >THINK< that you should do this:

And conditions (Multiple functions)

item type of item being manipulated equal to desert eagle.
unit is a hero equal to true.
unit type of hero manipulating item is terrorist equal to false.

instead of what you did, so it makes sure to check them all. Additionally you can copy triggers to text by rightclicking the top of the trigger and selecting copy to text.
06-20-2004, 01:19 AM#3
DoN_Rpg
ok the entire map is now bugged somehow....every time u pick up a gun the game crashes...i deleted the trigger and made a new one as simple as possible

event: unit acquires item
condition: item equal to desert eagle
action: replace hero manipulating item with deserteaglehero

the game STILL crashes....therefor the map is just bugged...and all the icons i downloaded that were working before all of a sudden dont work and it just looks like a "?".....does anyone know how to debug maps? or better yet could i give my map to someone to fix...reply for debuggin map, or pm me if u want me to give map to u to fix...i would greatly appreciate this...and if someone can fix the map i will DEFINATELY put ur name in credits
06-20-2004, 04:42 AM#4
ChaosWolfs
Quote:
Originally Posted by DoN_Rpg
ok the entire map is now bugged somehow....every time u pick up a gun the game crashes...i deleted the trigger and made a new one as simple as possible

event: unit acquires item
condition: item equal to desert eagle
action: replace hero manipulating item with deserteaglehero

the game STILL crashes....therefor the map is just bugged...and all the icons i downloaded that were working before all of a sudden dont work and it just looks like a "?".....does anyone know how to debug maps? or better yet could i give my map to someone to fix...reply for debuggin map, or pm me if u want me to give map to u to fix...i would greatly appreciate this...and if someone can fix the map i will DEFINATELY put ur name in credits

Delete the Desert Eagle and Remake it. Then try and reimport all the icons. Now give it a try.
06-20-2004, 05:00 AM#5
DoN_Rpg
i deleted desert eagle and remade it and the game still crashes...and i re imported all icons and they still dont work....so i think that can show you that the map is bugged