Plate Posted July 22, 2012 Posted July 22, 2012 Hola!!!!!! a todos como podria hacer para crear un area donde las personas maten zombies y spawnee un bot se puede?
Castillo Posted July 22, 2012 Posted July 22, 2012 createColRectangle -- Para la zona. onZombieWasted -- Para cuando un zombie muere. exports [ "slothbot" ]:spawnBoth ( argumentos ) -- Para spawnear un bot.
Plate Posted July 23, 2012 Author Posted July 23, 2012 solamente esos no tengo que usar getElementData?
Plate Posted July 23, 2012 Author Posted July 23, 2012 function zona() createColCuboid ( 189.61836242676, 1979.748535355163, 17066425, 220, 200, 60 ) slothbot = exports [ "slothbot" ]:spawnBot ( 189.61836242676, 1979.748535355163, 17066425, 90, math.random ( 300, 303 ), 0, 0, Boss, 38, "hunting", true) exports.extra_health:setElementExtraHealth ( slothbot, 5000 ) end addEventHandler("onZombieWasted",getRootElement(),zona)
Castillo Posted July 23, 2012 Posted July 23, 2012 local colshape = createColCuboid ( 189.61836242676, 1979.748535355163, 17066425, 220, 200, 60 ) function zona ( ) if ( isElementWithinColShape ( source, colshape ) ) then slothbot = exports [ "slothbot" ]:spawnBot ( 189.61836242676, 1979.748535355163, 17066425, 90, math.random ( 300, 303 ), 0, 0, Boss, 38, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 5000 ) end end addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", getRootElement(), zona )
Plate Posted July 23, 2012 Author Posted July 23, 2012 Solid pero se ahora como aria para que spawnee cuando el player entra a la zona y se ponga a matar zombies ejemplo Jugador_x entra a esa zona aparecen zombies empiesa a matar zombies y de la nada aparece el bot se puede?
NodZen Posted July 23, 2012 Posted July 23, 2012 Solid pero se ahora como aria para que spawnee cuando el player entra a la zona y se ponga a matar zombies ejemplo Jugador_x entra a esa zona aparecen zombies empiesa a matar zombies y de la nada aparece el bot se puede? if ( getElementType ( thePlayer ) == "player" ) then O tambien getPlayerName
Plate Posted July 23, 2012 Author Posted July 23, 2012 NOD eso que me pasastes lo agrego o remplazo el if ( isElementWithinColShape ( source, colshape ) ) then y sirve para lo que yo pedi ? o tengo que agregar mas cosas
NodZen Posted July 23, 2012 Posted July 23, 2012 NOD eso que me pasastes lo agrego o remplazo el if ( isElementWithinColShape ( source, colshape ) ) then y sirve para lo que yo pedi ? o tengo que agregar mas cosas Tu lo que quieres es que diga el nombre del player , o que solo diga " Has entrado a la base"? por asi decirlo
Plate Posted July 23, 2012 Author Posted July 23, 2012 No estamos hablando de la base este topic es sobre una zona para spawnear un bot osea que el jugador entre a una zona y mate zombies hasta que spawnee un bot
Plate Posted July 23, 2012 Author Posted July 23, 2012 entro a la zona mato zombies pero el bot no spawnea
Plate Posted July 24, 2012 Author Posted July 24, 2012 Ya se arreglo era un `problema con la posicion z pero solid el bot aparece cuando mato un zombie yo quisiera que por lo menos matenn 30 y aparesca
Castillo Posted July 24, 2012 Posted July 24, 2012 Crea una variable y anda incrementandola, luego fijate si esa variable es mayor o igual que 30 y ahi lo spawneas al bot.
Castillo Posted July 24, 2012 Posted July 24, 2012 No necesitas ningun evento, ya te explique como se hace.
Plate Posted July 24, 2012 Author Posted July 24, 2012 local colshape = createColCuboid ( -1916.9927978516, 1182.4553222656, 46.214420318604, 220, 200, 60 ) createRadarArea ( -1916.9927978516, 1182.4553222656, 220, 200, 0, 0, 0, 100 ) -- esto lo cree para saber donde esta el area function zona ( ) if ( isElementWithinColShape ( source, colshape ) ) then slothbot = exports [ "slothbot" ]:spawnBot ( -1787.2111816406, 1216.2250976563, 32.65625, 90, math.random ( 300, 303 ), 0, 0, Boss, 38, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 5000 ) outputChatBox("Prueva 1") local myBlip = createBlipAttachedTo ( slothbot, 23 ) local zk = onZombieWasted if zk >= 30 then end end end addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", getRootElement(), zona )
Plate Posted July 24, 2012 Author Posted July 24, 2012 local colshape = createColCuboid ( -1916.9927978516, 1182.4553222656, 46.214420318604, 220, 200, 60 ) createRadarArea ( -1916.9927978516, 1182.4553222656, 220, 200, 0, 0, 0, 100 ) -- esto lo cree para saber donde esta el area function zona ( ) if ( isElementWithinColShape ( source, colshape ) ) then slothbot = exports [ "slothbot" ]:spawnBot ( -1787.2111816406, 1216.2250976563, 32.65625, 90, math.random ( 300, 303 ), 0, 0, Boss, 38, "hunting", true ) exports.extra_health:setElementExtraHealth ( slothbot, 5000 ) outputChatBox("Prueva 1") local myBlip = createBlipAttachedTo ( slothbot, 23 ) local zk = Zombie kills -- asi? if zk >= 30 then end end end addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", getRootElement(), zona )
Plate Posted July 24, 2012 Author Posted July 24, 2012 Ya lo lei y todabia no la entiendo tenes algun link de algun script en la comunidad para tomar de ejemplo
Recommended Posts