Jump to content
The Dark Mod Forums

Sotha's mapping thread


Sotha

Recommended Posts

The material needs a special stage for frob-highlighting. It's here on the wiki. If you want to use Doom 3 moveables for example, you'd have to find their material definitions, and plug in a frob highlight stage in their skins.

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

The material needs a special stage for frob-highlighting. It's here on the wiki. If you want to use Doom 3 moveables for example, you'd have to find their material definitions, and plug in a frob highlight stage in their skins.

 

Aha! I was wondering some time back that what was those parm1 things.

 

Should I also add that virtual ambient light code part to my materials?

 

Thanks!

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Got the frob highlight to work.

 

Another question:

 

There is a special object in the player inventory. Can I have it so that USING it drops the object to player hands.

Using means selecting it in the inventory and pressing enter.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Got the frob highlight to work.

 

Another question:

 

There is a special object in the player inventory. Can I have it so that USING it drops the object to player hands.

Using means selecting it in the inventory and pressing enter.

 

Erm, no we have a hotkey (drop) for that, and I'd rather not that have that individual FMs change the meaning of hotkeys/actions willy-nilly - consistent user interface and all that :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Aha! I was wondering some time back that what was those parm1 things.

 

Should I also add that virtual ambient light code part to my materials?

 

Thanks!

 

Yes :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

If you have some special case where 'use' actually does something and you also want it to drop into the hands for some reason then you might do a special script I guess. Hard to think when you would want that.

 

Say you use a magic talisman to open a door and the talisman also drops into the carry position? I suppose if you made it a items > custom > atdm:moveable_custom_item then give it a target to call a script to call a 'drop to carry' script (if there is one) then activates the door. So the effect might be like holding up a wizard's wand and a gate then opens.

Link to comment
Share on other sites

Just thought of another reason you might want this. Say the talisman has a damage stim and you want to hold it out to kill a monster but the player might be madly hitting 'use' to no effect? Same applies using the above entity but needs some way to trigger drop.

 

Hope I'm not spoiling anything with guessed examples. :laugh:

Link to comment
Share on other sites

If you have some special case where 'use' actually does something and you also want it to drop into the hands for some reason then you might do a special script I guess. Hard to think when you would want that.

 

 

I have my reasons, but yeah, I basically want the item use to make it drop it into hands. The basic idea is to avoid the player be confused with the use function, because the object must be placed elsewhere and simple dropping would be unintuitive.

 

You'll see this once I release my fm.

 

So is there a script command like object-name.dropToHands() ?

 

Or similar, this would be exactly what I need.

 

The other alternative would be to make the object obviously unusable, ie no red flash upon use attempt. Anyway, dropping-to-hands script would be much better..

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I've not tried it but this seems to be what you want:

 

scriptEvent float holdEntity( entity e );

 

I can't recall how familiar you are with scripting so if you need further help just ask.

 

An alternative, to block the red flash is I think just to change:

 

"scriptobject" "InvTriggerScript"

to:

"scriptobject" "-"

Link to comment
Share on other sites

I've not tried it but this seems to be what you want:

 

scriptEvent float holdEntity( entity e );

 

I can't recall how familiar you are with scripting so if you need further help just ask.

 

 

Thanks.. Ehm. I'm not very familiar with scripting.

 

I do have the map.script file, but how do I use this? How do I activate the script when the object is used?

 

And what is the syntax in the script file: object.holdEntity($player1); ?

 

 

EDIT: the red flash block suggestion gives only an error message:

script object '-' not found on entity.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I assume by map.script you mean you already have a script file in your maps folder named <mymapname.script.

 

I'll have to come back in an hour or two to give you details as I've no time right now and I also want to set it up and test it works myself.

Link to comment
Share on other sites

I assume by map.script you mean you already have a script file in your maps folder named <mymapname.script.

 

Yep. I played around with grayman's excellent movie tutorial. I have a basic script file with one movie clip entry, which I've targeted as per grayman's instructions. That's basically all I know about scripting.

 

 

I'll have to come back in an hour or two to give you details as I've no time right now and I also want to set it up and test it works myself.

 

Thank you so much for help! :wub:

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

"scriptobject" "-" should be "scriptobject" "" (otherwise it tries to load the script object "-":)

 

Also, to trigger a script when a player frobs or uses an object, use:

 

* "equip_action_script" "name_of_the_global_function" (when the player uses an item in his hands, our oillamps use this to toggle the light off)

* "use_action_script" when the player uses an item in the inventory

* "frob_action_script" when the player frobs an item in the world (you can see our candles using this)

 

Simply add a function named like so:

 

void do_something(entity ent)
{
 // ent is the entity that was frobbed/used/equiped
 // $player1 is the player
 sys.println("do_something called with entity " + ent.getName());
}

 

into your map script file. When it is triggered, it will print the name of the entity to the console. This way you can test that it works.

 

For instance if you add "frob_action_script" "do_something" to an entity, frobbing it will cause your function above to be called.

 

Here is the relevant doc:

 

def/tdm_base.def
66:     "editor_var frob_action_script"         "Script to call when this entity is frobbed."
71:     "editor_var used_by"                            "Contains an entity name of an inventory item that can be used on this object.  Multiple used_by keys are possible by numbering them (like 'used_by_3').  A used_by object calls a corresponding used_action_script_<name>, or, if a specific script is not available, it calls the default that is set in the used_action_script key.  Doors and locks use this for keys that open them as well."
75:     "editor_var used_action_script"         "Contains the script name to call when this object is used by an object on the used_by lists.  Different scripts may be called for different items by adding another used_action_script spawnarg followed by the item specifier as shown: item specifier as follows: used_action_script_<specifier> .  The specifier may be the item's entity name, inventory name, inventory category or entityDef classname."
77:    "editor_string equip_action_script"      "If defined, this script will be run when the user holds the item in his hands and presses the 'Use/Equip' key."

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Not much luck I'm afraid with either method. script object is rejected by both doom and DR if it is null. Also not clear what type of entity to use it on.

 

I got my method working to move a test object to the carry position and then frob a door but my test object would not then go back into the inventory. This is because when I press 'use' again then it calls the special script to drop it to the carry position rather than move it back. So it needs some test to determine where it is and call another function to move it back. Unless you want to just use this object once then it disappears like a magic object?

 

Also there is the problem what if the player uses drop anyway? It won't call the script. Is that OK?

Link to comment
Share on other sites

Not much luck I'm afraid with either method. script object is rejected by both doom and DR if it is null. Also not clear what type of entity to use it on.

 

I got my method working to move a test object to the carry position and then frob a door but my test object would not then go back into the inventory. This is because when I press 'use' again then it calls the special script to drop it to the carry position rather than move it back. So it needs some test to determine where it is and call another function to move it back. Unless you want to just use this object once then it disappears like a magic object?

 

Also there is the problem what if the player uses drop anyway? It won't call the script. Is that OK?

 

I didn't fully understand what you mean, sorry.

 

All I need is to have the object USE to drop it into hands as if the normal drop button was pressed. Nothing else is required as long as the situation is exactly the same as if the player pressed the drop button.

 

I am PM:ing you all the technical details what I want to accomplish. I'll not put it here since it is a huge spoiler for my mission.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Didn't seem to be the perfect solution.

 

Does anyone know which script command (or something) gets executed when the player presses the drop key?

 

All I really need is to have the object USE to target this command and I'm good.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Didn't seem to be the perfect solution.

 

Does anyone know which script command (or something) gets executed when the player presses the drop key?

 

All I really need is to have the object USE to target this command and I'm good.

 

even if you can't get it to work, I wouldn't worry too much about it. As one of the beta-testers I know exactly the particular thing you are thinking of, and using the drop button to put it in the players hands seemed completely logical and intuitive to solve the puzzle. Didn't take me more than 1 second to figure it out.

Link to comment
Share on other sites

Sotha's mapping thread is hereby closed until further notice.

 

All the models, geometries and entitywork in my maps are free to be used by other mappers as long as they're non-profit. Stuff like models and textures can also be added as TDM resources if someone wants to do that.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Hope you'll still be hanging around, even if you're taking a break from mapping.

Link to comment
Share on other sites

Hope you'll still be hanging around, even if you're taking a break from mapping.

 

Yeah, don't sweat it. I'll be around.

 

Just wanted to make sure that no one needs to think about whether they can use my creations or not. I'll be just happy if they bring benefit to other mapping endeavors..

 

 

I think that the puzzle lock could be made into a prefab. Mappers only need to change targettings to create their own unique 4 switch puzzles. And the system is easily expandable into 5-6 lever puzzles.

 

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Sotha's Interview at Moddb has been released:

 

http://www.moddb.com/mods/the-dark-mod/features/sotha-interview

 

(As it again has not had any effect on the "update status" I have created another follow-up "News" article so that people will actually know this was posted... They should authorize that article soon... <_<)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Good interview! :)

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Sorry for a little derail but I feel the need to address this.

 

I am not sure the etiquette for a compliment paid to an interview (whether the interviewer or the subject should respond). I will say "Thanks" to cover my bases. (I felt so rude for awhile there... :laugh: )

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 2 weeks later...

After playing Jesps excellent new mission (and after hot sauna and ice cold beer) I decided to make a mission of tiny/small size category. It continues the Porter story shortly after Glenham Tower.

 

Nothing fancy, just a small fm, for fun and to test new techniques.

 

Mapping started on 5.12.2010.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...