Jump to content
The Dark Mod Forums

Deshtat

Member
  • Posts

    85
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Deshtat

  1.  

    Do any lights in that area have the "parallel" setting ticked? Parallel lights play by different rules.

    No, it doesn't look like it...

     

    Actually, I found out the problem with the lights going through walls : the problem is that I'm stupid. I applied a texture that had "noshadow" in it on my wall x) I must have misclicked...

     

    For the other problems, though, I still have no clue.

  2. Are you not building on the grid or using a small grid size like size 1?

    I mainly use a 8 sized grid for the brushes, though I use smaller grids for entities like torches or items.

     

    Some lighting issues can also be caused by non-properly working visportals. So check for that, too.

    I'll do that this evening!

     

    Are you using particles anywhere nearby? I've sometimes found them interacting with light volumes in curious ways.

    No, unless the torch flames are considered as particles.

  3. Well I already have a print command at the beginning of the script, but it won't show in the console, so I guess it doesn't run at all.

    I tried with one and two arguments, and without any as well, but still nothing... I really don't get it x)

    EDIT : It just worked! SteveL was right : R4Torch was probably used somewhere. All I did was changing the name. Thanks a lot!

  4. What's the exact error? Or does the map freeze on startup?

     

    In general avoid using obvious keywords as variable names in scripts. There's some namespace pollution somewhere in the game scripts that I've not got round to investigating that can cause map freeze on startup if you use certain names that are used elsewhere. I'd habitually rename player1 to actor1 or player_ or something before even testing a script to avoid it. But if you get an error instead of a freeze, please post it.

    Actually, I don't get any error. The script just won't start as it is supposed to. I thought it had something to do with the info, but since I don't get an error, maybe it's all about the calling of the script itself.

     

    Just checking : does this water response look ok to you? It is applied to my torch.

    1424899064-waterresponse.jpg

  5.  

    I think it is one of the following:

    • void thetutoR4Doors ()
    • void thetutoR4Doors (entity e1)
    • void thetutoR4Doors (entity e1,entity e2)

    The last one is used if you setup the response per script, so this would be my best bet. One of the entities should be the one who causes the response (so the player) and the other which entity responses or so. Just try it.

    Thanks for your help ^^ I tried this :

    void thetutoR4Doors(entity player1, entity R4Torch) { ...}
    

    However, it still doesn't run. Is "player1" the right thing to write to designate the player?

  6. Good evening!

     

    So I've set up a water response on a torch, that is supposed to call a script. The problem is that I don't know what kind of info to give to my function. Here is the script :

    void thetutoR4Doors (???) { 
    
    sys.print("\n\nTorch unlit");
    $room4door1.activate($player1) ;
    $player1.setObjectiveState(8, OBJ_COMPLETE);
    
    }
    

    I tried to give no particular info, but it didn't run. Any ideas?

  7. Thanks for the quick answers Moonbo!

     

    I will try to do as you say tomorrow evening! I'm not sure I completely understood the second part, but I'll come back anyway ^^

     

    EDIT : Couldn't wait, the first one works perfectly! Thanks for sharing! I'll try to do the second part tomorrow.

  8. Two new riddles for you guys !

     

    1) There is a corridor, in which there is only a lit torch, and some water arrows. I want the player to extinguish the torch. The problem is that I don't want the player to be able to pick an infinite amount of arrows, and I don't want him to get stuck if he runs out of them.

    Instead, I would like a single arrow to spawn every time the amount of water arrows in the player's inventory reaches 0. Do you know how I could do that?

     

    2) I would like to call a script once the torch is unlit. I thought that there would be some kind of spawnarg such as "call_once_on_unlit", but I can't find any. I can't seem to do it with objective conditions either. Is there another way?

     

    Thanks again for your time.

  9. Hey there!

     

    So I am making progress thanks to you all, and everything is going fine. I still have a minor problem I would like to ask you about, though :

     

    I created some unfrobable doors that will shut behind the player each time he successfully passes a step of the level. This way, he can't go back, and the engine saves some useless rendering. The problem is that the AIs of the previous areas keep reacting to the player's noises, even though they are not in the same room anymore.

     

    Do you know if there is a way to disable them completely?

    I first thought about teleporting them in a spare room, but I would like to know if there are more saving options.

     

    Thanks in advance!

  10. Well apparently none of my lines work, which is strange xD Even a single console print won't work. I think there must be something weird going on with the script call or the objective itself... I'm gonna check this, thanks x)

     

    EDIT : Could it be the fact the script refers to "other"?

    void thetutoR1fail(entity other) { ... }

    EDIT 2 :

     

    Fixed! It was this line indeed. I had to write it this way :

    void thetutoR1fail() { ... }
  11. For your "player is in a particular location" objective, try using the goal "is in location" and not "is in info_location".

     

    The location brush should be an "info_tdm_objective_location", using the CLIP texture, and having the same name you define in the objective.

    I'll try this next time ^^ Thanks. For now I'm just using a script.

     

    Another question for you :3

     

    I would like to teleport the player back to the "info_player_start_1" when he fails his objective. In order to do so, I created a script that is called when the objective fails:

    void thetutoR1fail(entity other) { 
    
    $guard_noise.setAlertLevel(0) ;
    playerEnt.setOrigin( $info_player_start_1.getOrigin() );
    $player1.setObjectiveState(3, OBJ_INCOMPLETE);
    }
    
    

    Unfortunately, I get this error when dmaping : Error: file maps\thetuto\thetuto.script, line 24: Unknown value "playerEnt"

     

    I got this command from the wiki, but I guess it is out of date. Do you know what I sould do?

     

    Thanks again!

  12. I've encountered that too, but I haven't got around to writing a bug report. However, I did find that the location-related spawnargs on the atdm:target_addobjectives entity do seem to exist after creation through the objectives editor, even though the objectives editor seems unable to read them.

     

    That's right, it seems to only affect the editor, and not the actual entity.

     

     

    I'm sure greebo will fix this quick if it's indeed a DR bug, and if it gets reported in his thread. Rather than script adding the objectives, scripts can trigger objective completion too, so you could just add a line to your location-entry script:

     

    http://wiki.thedarkmod.com/index.php?title=TDM_Script_Reference#scriptEvent_void_setObjectiveComp.28float_ObjNum.2C_float_CompNum.2C_float_state.29.3B

     

    This worked, thanks a lot! I will proceed this way from now on.

     

     

     

    Thanks, I tried this process as well, but it didn't seem to work for me :/ I don't really understand why.

  13. Well, here I am again x) I'm having a strange issue with my objectives.

     

    I want to create an objective that is completed when the player reaches the second room of the level. The two rooms have their own "info_location" entities. Thus, I want the objective to be completed when the "idPlayer" enters the room where "info_location_room2" is.

     

    I tried to setup my objective like this :

     

    1424014876-ppt1.jpg

     

    The problem is that, when I save it, my objective "forgets" the last part, and instead of having "Name of single entity : info_location_room2", it turns back into "No specifier".

     

    Did I do something wrong?

  14. The script itself looks fine. The problem is that the location system wants to pass a parameter to any script that you call on entering or exiting a location -- it passes the ID of the previous location in case your script wants to know. Your script has to accept that piece of info even if it doesn't plan on using it.

     

    Fix it by changing this line to:

    void thetutoR1Doors( entity old_zone ) {
    Example at: http://wiki.thedarkmod.com/index.php?title=Location_Settings#Script_calls

     

     

    Yaaay! It works! Thanks a lot!

     

    I'm gonna try something else now... I guess I'll be back later. x) Thanks again!

  15. Script documentation is patchy. The details are well documented, but not the bigger picture: the syntax and how to know what details you need. Come back and ask if you get stuck!

     

    It seems you are right, I can't get it to work properly ^^

     

    Actually, I created zones, with a "call_once_on_exit" script call. The script is supposed to close the doors behind the player.

    Here it is :

    void main() {
    
    sys.waitFrame();
    
    }
    
    // this script is supposed to be called by the info_location. It closes the doors "room1door1" and "room1door2".
    void thetutoR1Doors() {
    
    $room1door1.activate($player1) ;
    $room1door2.activate($player1) ;
    
    }

    The problem is that, when the player exits the zone, the game crashes, and I get this message :

     

    1424002634-training-mission-2015-02-15-1

     

    I don't really know if it means that the script is wrong or if it has to do with something else... any ideas?

×
×
  • Create New...