oops yeah added that in but still no warning message. I think you're right though, maybe try a different event.
Spawn script
Débuté par
jsd313
, janv. 09 2010 09:11
#26
Posté 10 janvier 2010 - 03:04
#27
Posté 10 janvier 2010 - 03:08
Maybe I can add something to destroy any object thats on TeamId 0 or has a certain tag like "enemy" during my modules script GAME_MODE handling.
case EVENT_TYPE_SET_GAME_MODE:
{
int nGameMode = GetEventInteger(ev, 0);
if ( nGameMode == GM_DEAD )
{
DoAreaTransition("arena", "start");
nEventHandled = TRUE;
}
break;
}
}
case EVENT_TYPE_SET_GAME_MODE:
{
int nGameMode = GetEventInteger(ev, 0);
if ( nGameMode == GM_DEAD )
{
DoAreaTransition("arena", "start");
nEventHandled = TRUE;
}
break;
}
}
#28
Posté 10 janvier 2010 - 03:12
Does that area transition take you to another different area?
Have you tried just walking out of the area and then back in again without fighting at all?
By the way your posts would be much cleaner if you surrounded your code with dascript tags:
[dascript]
code here
[/dascript]
Have you tried just walking out of the area and then back in again without fighting at all?
By the way your posts would be much cleaner if you surrounded your code with dascript tags:
[dascript]
code here
[/dascript]
Modifié par Axe_Murderer, 10 janvier 2010 - 03:14 .
#29
Posté 10 janvier 2010 - 03:14
yes, if I die it puts me back at the starting waypoint of my starting area.
#30
Posté 10 janvier 2010 - 03:15
hah I was gonna ask how to post them like you where, thank you.
Modifié par jsd313, 10 janvier 2010 - 03:16 .
#31
Posté 10 janvier 2010 - 03:18
Quick reply window doesn't understand them so use standard form when you have code to post.
#32
Posté 10 janvier 2010 - 03:21
I will give you a quick rundown on my module. The area u start in is a large locked room. You gather some party members from the people standing around. You then talk to a guy who represents a certain arena. His conversation offers you a 2v2, 3v3, or 4v4 match and to exit. Depending what u selec depends on what area u get set to and how many enemy teammates spawn to fight against you.
So when you win you get ported back to where you came in at, and if you die you get ported back to the starting waypoint. All of the arena are closed areas no way out but to win or lose.
So when you win you get ported back to where you came in at, and if you die you get ported back to the starting waypoint. All of the arena are closed areas no way out but to win or lose.
#33
Posté 10 janvier 2010 - 03:26
Ok this ought to do it I think.
[dascript]
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "var_constants_h"
void main()
{ int nEventHandled = FALSE;
switch( GetEventType( GetCurrentEvent() ))
{
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{ object oWaypoint = GetObjectByTag( "cod4v4_team1" );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialWarrior01" ), 0 );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialPriest01" ), 0 );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialHunter01" ), 0 );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialMage02" ), 0 );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"warrior01.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialWarrior01" );
oWaypoint = GetObjectByTag( "cod4v4_team2" );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"priest01.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialPriest01" );
oWaypoint = GetObjectByTag( "cod4v4_team3" );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"hunter01.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialHunter01" );
oWaypoint = GetObjectByTag( "cod4v4_team4" );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"mage02.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialMage02" );
}
break;
case EVENT_TYPE_TEAM_DESTROYED:
{ DoAreaTransition( "arena", "cod" );
nEventHandled = TRUE; // set this if no further action is required for this event
}
break;
}
// If this event wasn't handled by this script, let the core script try
if ( !nEventHandled ) HandleEvent( GetCurrentEvent(), RESOURCE_SCRIPT_AREA_CORE );
}
[/dascript]
[dascript]
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "var_constants_h"
void main()
{ int nEventHandled = FALSE;
switch( GetEventType( GetCurrentEvent() ))
{
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{ object oWaypoint = GetObjectByTag( "cod4v4_team1" );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialWarrior01" ), 0 );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialPriest01" ), 0 );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialHunter01" ), 0 );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "SpecialMage02" ), 0 );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"warrior01.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialWarrior01" );
oWaypoint = GetObjectByTag( "cod4v4_team2" );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"priest01.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialPriest01" );
oWaypoint = GetObjectByTag( "cod4v4_team3" );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"hunter01.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialHunter01" );
oWaypoint = GetObjectByTag( "cod4v4_team4" );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"mage02.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "SpecialMage02" );
}
break;
case EVENT_TYPE_TEAM_DESTROYED:
{ DoAreaTransition( "arena", "cod" );
nEventHandled = TRUE; // set this if no further action is required for this event
}
break;
}
// If this event wasn't handled by this script, let the core script try
if ( !nEventHandled ) HandleEvent( GetCurrentEvent(), RESOURCE_SCRIPT_AREA_CORE );
}
[/dascript]
Modifié par Axe_Murderer, 10 janvier 2010 - 03:28 .
#34
Posté 10 janvier 2010 - 03:34
OMG it WORKS!!!!!
[dascript]
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "var_constants_h"
void main()
{ int nEventHandled = FALSE;
switch( GetEventType( GetCurrentEvent() ))
{
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{
object oWaypoint = GetObjectByTag( "test" );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "enemy" ), 0 );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"knight.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "enemy" );
}
break;
case EVENT_TYPE_TEAM_DESTROYED:
{
DoAreaTransition( "arena", "duels" );
nEventHandled = TRUE; // set this if no further action is required for this event
}
break;
}
// If this event wasn't handled by this script, let the core script try
if ( !nEventHandled ) HandleEvent( GetCurrentEvent(), RESOURCE_SCRIPT_AREA_CORE );
}
[/dascript]
[dascript]
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "var_constants_h"
void main()
{ int nEventHandled = FALSE;
switch( GetEventType( GetCurrentEvent() ))
{
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{
object oWaypoint = GetObjectByTag( "test" );
Safe_Destroy_Object( UT_GetNearestObjectByTag( oWaypoint, "enemy" ), 0 );
SetTag( CreateObject( OBJECT_TYPE_CREATURE, R"knight.utc", GetSafeLocation( GetLocation( oWaypoint )) ), "enemy" );
}
break;
case EVENT_TYPE_TEAM_DESTROYED:
{
DoAreaTransition( "arena", "duels" );
nEventHandled = TRUE; // set this if no further action is required for this event
}
break;
}
// If this event wasn't handled by this script, let the core script try
if ( !nEventHandled ) HandleEvent( GetCurrentEvent(), RESOURCE_SCRIPT_AREA_CORE );
}
[/dascript]
#35
Posté 10 janvier 2010 - 03:37
Cool cuz I was out of ideas...
#36
Posté 10 janvier 2010 - 03:38
Wow man thank you so much, and so far I have killed this guy 6 times and no corpses just blood spots. When I zone in after getting him to half health the first time, it don't matter he is 100% health now!.
Again thank you so much for your time on this man, you helped me solve a major issue. I really appreciate it.
Again thank you so much for your time on this man, you helped me solve a major issue. I really appreciate it.
#37
Posté 10 janvier 2010 - 03:41
Worst part about this.. I now have like 30 scripts to update lol
#38
Posté 10 janvier 2010 - 09:38
You should make all your similar area scripts point to one my_area_core script, then do your common handling there
#39
Posté 10 janvier 2010 - 02:55
That's a great idea, next major change I think I'll move everything over and try that.





Retour en haut






