474 |
|
if (args[0].type == sl_str32) index = DDrGetCharacterIndexFromName(args[0].value_str32); |
475 |
|
else index = args[0].value_int32; |
476 |
|
|
477 |
< |
Chr = ONgGameState->CharacterStorage; |
478 |
< |
Active = ONrGetActiveCharacter(&Chr[index]); |
477 |
> |
Chr = &(ONgGameState->CharacterStorage[index]); |
478 |
> |
Active = ONrGetActiveCharacter(Chr); |
479 |
|
if (!Active) return 1; |
480 |
|
|
481 |
|
for(i = 1; i < numargs - 1; i++) { |
818 |
|
SLrScript_Command_Register_ReturnType("d_regen","Gets or sets a character's health", "[ai_name:string | script_id:int] [newhealth:int]", sl_str32, bsl_regen); |
819 |
|
SLrScript_Command_Register_ReturnType("d_maxhealth","Gets or sets a character's maximum health", "[ai_name:string | script_id:int] [newmaxhealth:int] [scalehealth:bool]", sl_str32, bsl_maxhealth); |
820 |
|
SLrScript_Command_Register_ReturnType("d_powerup","Gets or sets a character's powerups", "[ai_name:string | script_id:int] powerup:string", sl_int32, bsl_powerup); |
821 |
+ |
//d_holdkey is broken! |
822 |
|
SLrScript_Command_Register_ReturnType("d_holdkey","Makes a character hold a key", "[ai_name:string | script_id:int] frames:int keys:string", sl_int32, bsl_holdkey); |
823 |
|
SLrScript_Command_Register_ReturnType("d_isheld","Checks if player is holding a key", "[ai_name:string | script_id:int] [keys:string]", sl_int32, bsl_isheld); |
824 |
|
SLrScript_Command_Register_ReturnType("d_location","Returns the X, Y or Z coord of a character", "ai_name:string | script_id:int xyz:string [newlocation:float]", sl_float, bsl_location); |