Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

DSoS' Scripting Questions.


DsoS
 Share

Recommended Posts

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

thinking of a new script, but not really sure how to start it. Any tips?


scn aadsosbosslvlScript


begin onTrigger Player


	lock all doors

	enable flashing red lights (strobe-light effect) .1 sec between flashes

	enable first round of npcs

		elseif

			first round is dead

			enable second round of npc's

q

					if second round of npcs is dead

					give player 1 minute (real-time) to heal or rest

							after timer up

								Enable Suspensful music to intimidate player

								25 second timer 

									enable boss npc

										if boss npc dead

										enable boss chest

										lock doors

Thats the basic thought of the script.

Link to comment
Share on other sites

thinking of a new script, but not really sure how to start it. Any tips?


scn aadsosbosslvlScript


begin onTrigger Player


	lock doors

	flashing lights (strobe-light effect) .1 sec between flashes (should be adjustable for testing light flashes)

	creepy sound plays

	10 second timer before first round

	enable first round of npc's (3 npcs)

		elseif

			if first round is dead

			enable second round of npc's (5 npcs)

				elseif

					if second round of npc's is dead

					give player 1 minute (real-time) to heal or rest

							after timer up

								Enable Suspenseful music to intimidate player

								25 second timer 

									enable boss npc (READ NOTE BELOW)

										if boss npc dead

										enable boss chest

										flashing lights stop

										lock doors

Boss fight: the boss spawns with 3 npcs. I would like the boss to be invisible until the 3 other npcs are dead. Once the Boss is at 75% health, I'd like 3 more npcs to spawn. The same with 50%, 25% health, and zero % health. ( will use the same npc's for this, so not to have to make too many creatures and refs.)

That's the basic thought/layout of the script.

I know I'll need a timer for this, I can do a simple timer, but anything more than one timer gets a bit confusing to me. I also know I'll need like ActorRef.GetDead or something.

Edited by DsoS
Link to comment
Share on other sites

1. Doors have a reference name and you specificall lock each one.

2. The flashing lights would be similar to the lightning script.

3. You can use 'GetDead' or you could put a 'OnDeath' script on each of them and increment a global counter by one for each creature that dies. Your other script then checks if the count is '3'.

4. You could check the boss's health and use multipication by .75, (etc) to get the time when you would enable the NPC underlings.

I hope this is not for the halloween entry, your not supposed to ask for help. :pints: (I think...)

Link to comment
Share on other sites

no its for my other mod

I'm taking a break from the Halloween mod today ;)

(I'm glad you reminded me about that though, I completely forgot about that rule) :pints:

So for that case, lets not help me on this, since I am working on two different Halloween mods.... We don't want to get in trouble, in case of some misunderstanding.

and I actually might use it or not, just depends on how difficult the script is to do :evil:

Link to comment
Share on other sites

The script is a bit more difficult for new scripters. Plan out what you want to do, and for each step, decide 'how' you know when to start it, and 'what' you will need in order to accomplish the step. Then just make the script one piece at a time, making sure each section works before starting the next section.

If you get stuck, post up what you have and we shall see what we can do to get it working. If you say its not part of your halloween entry, that is good enough for me and everyone else too. :pints:

Link to comment
Share on other sites

What would cause my npcs not to enable?


short triggered

Short timer1


Begin ontrigger player

     If triggered == 0

       Mydoor01ref.setopenstate 0

       Mydoor01ref.lock 100

      *snipped another door ref like above*

        Set triggered to 1

      Endif

End


Begin gamemode

     If triggered == 1

         Set timer1 to 10

      If timer1 > 0

          Set timer1 to timer1 - getsecondspassed

      Else

           Mynpc01ref.enable

            *snipped two npc refs like above*

            Set triggered to 2

          Endif

        Endif

End

The doors lock but the npcs does not enable

I think its something with the timer. Im not sure if the timer is working. I waited for upto 30 seconds for them to show up. Ive looked around the area to they arent anywhere.

Also im not sure if i need the "triggered" part either. Its for the boss fight stuff from a few posts up.

I typed this from my phone. I dont think there are any typos. And the script saves nicely in the cs

Link to comment
Share on other sites

1. You set the timer to '10' every single frame.

2. You have too many EndIf blocks in your example.

short triggered
Short timer1

Begin ontrigger player
If triggered == 0
Mydoor01ref.setopenstate 0
Mydoor01ref.lock 100
Set triggered to 1
Set timer1 to 10
Endif
End

Begin gamemode
If triggered == 1
If timer1 >= 0
Set timer1 to timer1 - getsecondspassed
Else
Mynpc01ref.enable
Set triggered to 2
Endif
Endif
End[/code]

Link to comment
Share on other sites

3. You can use 'GetDead' or you could put a 'OnDeath' script on each of them and increment a global counter by one for each creature that dies. Your other script then checks if the count is '3'.

Im goin to use the OnDeath script for each of my npcs. Ive already created all of them. Also created my global for each round.

But im a little confused on how to set the death count by +1.

I know that in a normal script if it needs to be called only one the script would be


set myglobal to 1

But im confused on how i would set this on more than one npc. Im not even sure how to ask about this really. Im doing my best to do this script myself with little help, but its not working out very well :blink: Ive checked on the CS wiki but im not even sure what i would have to look for anyway. I plan on doing

begin ondeath


My global to +1


End

Link to comment
Share on other sites

Another issue...

I have two objects, one is a container and the other is a activator (visi

ble, touchable)

I cant give specific details since its for the challenge. But i would love a tip about what im doing wrong.

container code:


Begin onActivate Player


    If MyGlobal == 0

        Do something

        Do something

        Do something

        Set MyGlobal to 1

    Endif


    If MyGlobal == 2

        Activate

        Set MyGlobal to 3

    Endif

End


Begin OnRest stuff here


Object Two Activator


Begin OnActivate Player

    If MyGlobal == 1

        Do alot of stuff 

        Set MyGlobal to 2

    Endif

End

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.
Note: Your post will require moderator approval before it will be visible.

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.

 Share


×
×
  • Create New...