Jump to content
The Dark Mod Forums

games-furious

Member
  • Posts

    24
  • Joined

  • Last visited

Reputation

2 Neutral

Recent Profile Visitors

328 profile views
  1. i wish now can write the health of monsters when hited may be can use with scriptEvent entity getAttacker() ? using threads may be? but in my doubt in entityDef can be write the params in runtime? example is "inv_name" "Hited! cb_demon health is monster_boss_cyber_demon_1.getHealth()" or any idea how can i write on the screen the message? thanks
  2. no not added my map inside doom_main.script yet. i include many scripts inside my map.script working like threads this scripts not working like mods but only for my map.
  3. What I really need is to load a my gui showing a timer decrementing from 5 minutes to 0 then shows a message that you loose, can be in the HUD itself but I do not know how to do it then load the restart gui in image
  4. I tried your code he write to console " Going to Kill the entity player1 but dont kill the player like i said i use a Doom 3 editor v.1.31 and there the player is need have like info_player_start for open map Strange dont work. May be if possible assign value of health = 0 for player in run time may be can work?
  5. void main () { sys.waitFrame(); // always wait one frame before doing anything in main() // this ensures that the init() routines have all finished sys.wait(100); // wait 100 seconds /* $entityName here acts upon a specific entity. Be careful, if you rename the entity in DR, your script will break! $player1 is the player entity, and this only works in single player mode. However, there is no multiplayer in TDM, so we can safely use it for now: */ // put some information in the console sys.println("Going to kill the entity " + $player1.getName() ); $player1.kill(); // kill the player }
  6. I just made a test with script here from darkmod but i put $player1 and not work after $info_player_start_1 and nothing. If possible help me. please. Create the script file If your map is called for example maps/mydir/mymap.map, you must create a text file maps/mydir/mymap.script. The contents The map script needs to contain a main function. This function is called at the very start of your map, e.g. when the map is loaded for the first time. So if you want something to happen later, you need to pause the script and then do something. Here is an example:
  7. in this case you tell for i write like this? namespace my_map{ //put map code here float killed; void kill_player() { code ...... .......... ............... code } }
  8. I find this may be if possible use global variable then killed can be update everytime when void function started and health < = 0 look image but editor can compile #include <iostream> ???? or if anybody have a sugestion how use global variable with scripts please post.thanks
  9. but this is solved thanks the problem now is how increment and save value in var float killed.Like i said i using a trigger multiple for restart function then all values reseted, except time var float t by sys.getTime() the value update everytine sure.
  10. void kill_player() // is for enemy single player in this case { //sys.waitFrame(); float t; float killed; //$player1.setKey("health", "0.0"); //float killed = 0; t = sys.getTime(); sys.print(t); //float zombie_health = new_monster.getFloatKey("health"); //sys.println("health is " + zombie_health + "\n"); //sys.println("health by getHealth is " + $monster_zombie_fat_3.getHealth() + "\n"); if (t > 5) { //Code for spawn enemies Wherever you wish on the map entity new_monster; sys.setSpawnArg("name", "monster_zombie_fat_3"); // set spawnarg before spawning the entity new_monster = sys.spawn("monster_zombie_fat"); // example monster_zombie_fat or any class enemy name new_monster.setOrigin('-136 -120 11'); //sys.println("health is " + zombie_health + "\n"); //sys.println("health by getHealth is " + $monster_zombie_fat_3.getHealth() + "\n"); entity spawn_effects = sys.spawn("func_fx"); spawn_effects.setOrigin('-136 -120 11'); spawn_effects.startFx("fx/teleporter"); //float health = $monster_zombie_fat_3.getHealth(); sys.wait(10); // not good have a time limit for kill zombie or never will print value to console if ($monster_zombie_fat_3.getHealth() <= 0){ killed += 1; // ERROR ONLY UPTADE FROM 0 TO 1 everytime i triggered function call string myStr = new_monster.getKey("name"); myStr = "The name of zombie_fat is " + myStr + " killed = " + killed + " HEALTH is " + $monster_zombie_fat_3.getHealth() + "\n"; sys.println(myStr); // Print the text to the console } } }
  11. THIS CODE WORK but only with sys.wait(10) i need kill zombie before time wait 10 or i lost time to write a values to variables. But another problem is killed update only from 0 to 1 everytime. The function is restarted by trigger multiple then every values reseted. I need storage this values for used in game in this case de killed variable Need may be storage in cfg for get value of variable killed but how make this?
×
×
  • Create New...