
Originally Posted by
donkan
Make some kinda toggle variable that toggles every 0.01 second and when its on it will use findByClass and that RPG and when its off it will use the findByModel
That doesn't work. Both arrays still find both, rpgs and props.
Now, I think I got it, but the code looks terrible:
e2 Code:
findIncludeClass("rpg_missile")
findIncludeModel("models/hunter/misc/sphere075x075.mdl")
findExcludeClass("gmod_wire_spawner")
findInSphere(entity():pos(),100000000)
All = findToArray()
All_Count = All:count()
if($All_Count){
All_Index=0
Prop = array()
RPG = array()
}
if(All_Index<All_Count){
All_Index += 1
if(All:entity(All_Index):model()==
"models/hunter/misc/sphere075x075.mdl"&
All:entity(All_Index):owner()==owner()){
Prop:setEntity(Prop:count()+1,All:entity(All_Index))
RPG = RPG
}
if(All:entity(All_Index):type()=="rpg_missile"){
RPG:setEntity(RPG:count()+1,All:entity(All_Index))
Prop = Prop
}
}
Bookmarks