Jump to content


Photo

Bikerdude - Xmas FM


222 replies to this topic

#201 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 08 January 2010 - 09:08 PM

Ok, cant find a satisfactory answer to this...

I have a speaker entity in a location that I only want to go off once. The wiki says that once the player stands inside the sound radii he/shy should hear the noise, this dosen't appear to be the case..

The only way I cant get sound to work is it is by using looping or wait args - neither of which are applicable in the locations I want to use these sound/s.

#202 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 09 January 2010 - 12:45 AM

This is what you want:

http://modetwo.net/d...ng_a_Sound_Once

#203 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 09 January 2010 - 02:01 AM

This is relatively complicated and I've not tested it so take care at every step:

On my_front_door:

You can delete this property:
trigger_when_opened atdm:target_setobjective_state
That spawnarg is by default trigger_when_opened 1 which just means it will trigger its target when it opens.

The door's target is finish_mission which is a atdm:target_setobjective_state but you have obj_idN in it. That should be obj_id0. The 0 is just a number in case you wanted to set several objectives' states. (you will need to then delete the obj_idN as when you change it you just make a new spawnarg.) Also you are setting the obj_state to 0 which is incomplete not complete. Change that to 1. Also, it will trigger when you first leave home so it needs to be disabled until all the other objectives are done. To do this, add (in the objectives editor)

Enabling Objectives : 1 AND 3 AND 4 AND (5 OR 6 OR 7)

There is an extra problem because you have another objective, Objective 2, only on Difficulty levels 2 and 3 so the above atdm:target_setobjective_state is only for Level Easy so it must be excluded from Levels 1 and 2. Therefore you must also add to it the property/value:

diff_1_nospawn 1
diff_2_nospawn 1

In addition, that means you need a separate atdm:target_setobjective_state for Hard and Expert. Clone the above atdm:target_setobjective_state and delete one of those diff properties. Change the other one (so it doesn't spawn on Easy) to:

diff_0_nospawn 1

A further complexity is that this objective on Hard and Expert needs Objective 2 to be completed first. So you need to:

In the Objectives editor, set Objective 8 to Easy only
Duplicate Objective 8 (to make Objective 9)
Make Objective 9 to Hard and Expert only
Now you need to change the Enabling Objectives on Objective 9 to include 2:

Enabling Objectives : 1 AND 2 AND 3 AND 4 AND (5 OR 6 OR 7)

Now go back to the new atdm:target_setobjective_state that you cloned and change:

obj_id0 8
to:
obj_id0 9

~~~~~~~~~~

The other door is simpler:

Delete the trigger_when_opened property as it is 1 by default
On the atdm:target_setobjective_state that it targets, change obj_idN to obj_id0 (you will need to then delete the obj_idN as when you change it you just make a new spawnarg.)

~~~~~~~~~~

Typos: in every objective except 1, change your to you're (or you are)

#204 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 09 January 2010 - 09:17 AM

Biker, here's the fix for the non-solid footlockers:

http://modetwo.net/d...post__p__206330

#205 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 09 January 2010 - 06:04 PM

There is an extra problem because you have another objective, Objective 2, only on Difficulty levels 2 and 3 so the above atdm:target_setobjective_state is only for Level Easy so it must be excluded from Levels 1 and 2. Therefore you must also add to it the property/value:

A further complexity is that this objective on Hard and Expert needs Objective 2 to be completed first. So you need to:

I've remove all the complexity, by setting all objectives bar loot to all levels.

#206 Ishtvan

Ishtvan

    Programmer

  • Development Role
  • PipPipPipPipPip
  • 14860 posts

Posted 09 January 2010 - 08:49 PM

We had planned to let FM authors name an objective and use that name instead of the number, for cases just like this, but I think that's still on the TODO list.

#207 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 09 January 2010 - 10:34 PM

# but you have obj_idN in it. That should be obj_id0.
# Enabling Objectives : 1 AND 2 AND 3 AND 4 AND (5 OR 6 OR 7)


' obj_id ' isnt listed under properties, I take it this is another bug that needs to fixed..?

Didn't work'ish..., the objective dosent get ticked off, but the once the player complete all the other objectives the mission completes before allowing/waiting for the player to go home.. Is there no way to disable it..? or am I going to have to find another way to finish the mission, seems a bit odd when i know ive played other mission that telkl the play to return to his starting point....? Ive attached a screen-shot of my objectives..

Also whats the best way to get an electric light to flicker on and of randomly....?

Attached Thumbnails

  • Untitled.jpg

Edited by Bikerdude, 10 January 2010 - 01:04 AM.


#208 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 10 January 2010 - 06:43 AM

' obj_id ' isnt listed under properties, I take it this is another bug that needs to fixed..?

Yes it is - leastways on the map you sent me. Where are you looking? Look back at my instructions and see "Now go back to the new atdm:target_setobjective_state that you cloned and change:" so that's one entity. The other is "On the atdm:target_setobjective_state that [the door] targets." If you've deleted them then just type them in again. You probably don't need the end mission one anyway (see later.)

Didn't work'ish..., the objective dosent get ticked off, but the once the player complete all the other objectives the mission completes before allowing/waiting for the player to go home

You say you made objective 2 work on all difficulties. In that case you need to set the enabling objectives to include it. But that's not the cause of the problem. I don't see how this can work because when you go out the door at the start it completes the objective - but it's not enabled until later. So I can think of no way of getting that to work. I recommend you use the normal method as described in Startpack.

Keep the original Objective 8 temporarily for reference but disable it by setting the initial state to Invalid or if that doesn't work then set it invisible. Delete that objective later.

Create a new objective. Refer to http://modetwo.net/d...ectives_Done.27
If you are not using startpack and don't have the ready made EscZone then make it with brush textured clip and convert it to an entity info_tdm_objective_location
Copy the enabling objectives over (remember to include 2) in the objectives editor
You don't need the atdm:target_setobjective_state named finish_mission. Delete it. Nor does your front door need to target it any more.
Please post again if any problems.

Also whats the best way to get an electric light to flicker on and of randomly....?

I've not time to test this but set up a trigger_timer entity. If the light has no separate player switch to turn this light on and off then give this trigger_timer the property/value start_on 1 so it works all the time. Adjust the flicker with wait 0.5. You can also set random. I think that adds subtracts so eg, if you set wait to 1 (second) and random to 0.25 then I think it flickers randomly between 0.75 to 1.25 seconds). I also recommend you add an epilepsy warning in your readme.
[EDIT] The trigger timer needs to target the light of course and if you already have a light switch then it needs to target the trigger timer not the light.

I urge you to begin with Startpack with your next FM. It will save you a lot of work and a lot of hassle. :)

#209 Tels

Tels

    Mod hero

  • Member
  • PipPipPipPipPip
  • 15024 posts

Posted 10 January 2010 - 09:42 AM

About light flickering:

I've not time to test this but set up a trigger_timer entity. If the light has no separate player switch to turn this light on and off then give this trigger_timer the property/value start_on 1 so it works all the time. Adjust the flicker with wait 0.5. You can also set random. I think that adds subtracts so eg, if you set wait to 1 (second) and random to 0.25 then I think it flickers randomly between 0.75 to 1.25 seconds). I also recommend you add an epilepsy warning in your readme.
[EDIT] The trigger timer needs to target the light of course and if you already have a light switch then it needs to target the trigger timer not the light.

I urge you to begin with Startpack with your next FM. It will save you a lot of work and a lot of hassle. :)


A better way is to use a colorme shader (so the light's glass gets dark/light in sync with the light) and then use a sound that drives the light and syncronize the flickering to the sound. For instance:

entityDef atdm:static_electric_light_lit_base
{
    "inherit"               "atdm:light_base"
    "editor_usage"          "Base class for static lit electric light fixtures. Do not use."

    "AIUse"                 "AIUSE_LIGHTSOURCE"

    "light_radius"          "220 220 220"
    "_color"                "0.80 0.70 0.31"
    "light_center"          "0 0 0"
    "model"                 "models/darkmod/lights/non-extinguishable/streetlamps/squarestreetlamp.lwo"
    "s_looping"             "1"
    "s_maxdistance"         "5"
    "s_mindistance"         "1"
    "s_shader"              "light_flicker_105"
    "s_volume"              "2"
    "s_waitfortrigger"      "0"
    "texture"               "lights/biground1_streetlamp_4fold_snd"

    "editor_displayFolder"  "Lights/Switchable/Electric"

    "extinguished"          "0"

    // so we can use LightOn(), LightOf().
    // Switching skin does not work when triggered by a button:
    "scriptobject"          "tdm_light_holder"
}

You would need to change the line: "s_shader" "light_flicker_105" to use a different sound shader for more variances.
"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

#210 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 10 January 2010 - 04:20 PM

# Yes it is - leastways on the map you sent me.
# You say you made objective 2 work on all difficulties. In that case you need to set the enabling objectives to include it.

# I was referring to the entity properties
# doh, I missed that..

About light flickering:

Couldn't get this to work on my map, so will try it out on a test map..

Edited by Bikerdude, 10 January 2010 - 04:20 PM.


#211 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 11 January 2010 - 10:52 PM

Ok my mission is practically ready bar 1 thing....

Ive setup the last objective 'exactly' as it is in the startmap, but it wont complete - Ive tried putting the 'escape zone' in different locations but dosent help, I imagine I missing something really simple.....

I need someone to have a look at this for me, I will pm them the download link for the fm..

thanks

:blush:

Edited by Bikerdude, 11 January 2010 - 11:01 PM.


#212 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 12 January 2010 - 02:04 AM

I will take a look Biker but first check you are using 'location' and not 'info location' in the specifier in the objectives editor. I know the entity is called info but there are two kinds and this is confusing and a common mistake. Also make sure you dmap after you make the clip brush!

#213 Ishtvan

Ishtvan

    Programmer

  • Development Role
  • PipPipPipPipPip
  • 14860 posts

Posted 12 January 2010 - 02:51 AM

Yeah, location is a brush that you make (which I assume is what's done in the startpack?) info_location checks which idLocation you are in, just like you set up a location to play ambient music using location separators. If you want to make the brush they have to be within yourself, use location.

#214 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 12 January 2010 - 03:20 AM

I will take a look Biker but first check you are using 'location' and not 'info location' in the specifier in the objectives editor.

Hmmm, I have used 'atdm:info_tdm_objective_location' as used in the startmap, not "atdm:info_location" - Pm sent btw

Yeah, location is a brush that you make (which I assume is what's done in the startpack?)

..fyi the EscZone in the startmap never worked for me btw...

Edited by Bikerdude, 12 January 2010 - 03:54 AM.


#215 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 12 January 2010 - 07:14 AM

Maybe in the start map you didn't complete the other objectives? Did you remember to pluck the 4th chicken and give it to the pink kangaroo on the pogo stick? If you give it to the green one then it doesn't work.

Anyway, in the 'type' box where you have 'item is in info_location' you need instead to select 'item is in location'.

Also you don't want negative objectives as enabling objectives so remove AND 4 AND 5 so it should read:

1 AND 2 AND 3 AND (6 OR 7 OR 8)

Now the objective completes OK but it doesn't give Mission Complete. To fix this, the do NOT objectives need to be checked 'ongoing' You have it on one but not the other, I think it was the do not steal from the tavern. Anyway, just make sure they both have the radio button checked for on-going.

I just tested and it does work if you do the above. :)

#216 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 12 January 2010 - 03:31 PM

I just tested and it does work if you do the above.

Smashing, thanks fids..

That was all that really needed to be done, so I should be releasing in the next day or so, once I get the Ok from my testers...

Questions:

# is there anyway to change the spacing in the objectives list, so that all the objectives appear on one page in-game..?
# what pk4 or (wiki location) file are the inventory icons located, so I can choose which ones to use

Edited by Bikerdude, 12 January 2010 - 04:19 PM.


#217 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 12 January 2010 - 04:58 PM

There is no easy way to change the format of the objectives list without risking some other problem. I wouldn't mess with that if I were you. Maybe in the future we can consider it but I wouldn't do it last minute like this. Possibly the font size could be reduced but it would need testing and the code might be expecting a fixed number of lines so that might need changing too. What's the problem? Have you got an orphan - one or two lines over onto the next page?

The inventory icons are in dds format so you will need a dds viewer to see them. If you haven't got one then google for WTV which is a quick freebie dds viewer.

The icons are in tdm_gui01.pk4 and inside in folder dds\guis\assets\hud\inventory_icons

#218 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 12 January 2010 - 05:39 PM

The icons are in tdm_gui01.pk4 and inside in folder dds\guis\assets\hud\inventory_icons

I was gonna add two other objectives to my mission, and both required the icon in the inventory(drop food and wine off in two locations), but as I cant get the bloody things to work, I'll leave them out for now..

The mission as it stands is now ready for release, so Im gonna pm my testers and hopfully it will be out tomoz.

#219 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 12 January 2010 - 05:56 PM

Oh well - probably wise not to keep adding stuff at this late hour. BTW, if you were just worried about adding more objectives, the objectives menu automatically allows scrolling so as far as I know there is no unreasonable limit. My own FM has 18 objectives.

#220 Bikerdude

Bikerdude

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 17961 posts

Posted 14 January 2010 - 10:52 AM

afternoon

I will be releasing my mission today.

:D

#221 Fidcal

Fidcal

    Master Mapper

  • Development Role
  • PipPipPipPipPip
  • 16630 posts

Posted 14 January 2010 - 01:55 PM

Well done Biker. Look forward to playing it. :)

#222 NeonsStyle

NeonsStyle

    Advanced Member

  • Member
  • PipPipPip
  • 932 posts

Posted 05 February 2017 - 10:48 AM

Did this level ever get released Bikerdude? I'd be really interested to see some of your early work. You can learn a lot from that.



#223 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 7351 posts

Posted 05 February 2017 - 11:18 AM

Yes, this is "Business as Usual" though the latest version is substantially different than the original 2009 release.


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

http://www.indiedb.c...ds/the-dark-mod

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



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users