Author Topic: Scripting help  (Read 5784 times)

0 Members and 1 Guest are viewing this topic.

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Scripting help
« on: June 27, 2012, 08:33:15 PM »
Im new to mapping and stuff
and i need some scripting help.
i readed lots of tutorials, but i still dont know what kvp is.
can someone help me with this please?

McKay

  • Sup
  • Retired zombieX Admin
  • Elite member
  • ******
  • Posts: 1,215
Re: Scripting help
« Reply #1 on: June 27, 2012, 08:35:55 PM »
A kvp is a set of values that are used for a script.

You can change kvps by selecting the brush/model you need to add the kvps to and by pressing N this will open up the entity editor.

There on the bottom of that window will have two boxes.
They will be:

Key

Value

The tutorial that you are following will have a set of kvps if it requires a script. So for each kvp type in those two boxes and press enter for each one.
Maps made for Server:
Death Trap, Spherical, No Man's Land, Sumpf Trap, Dead City, Dead City V2, and Outlast.

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Re: Scripting help
« Reply #2 on: June 27, 2012, 08:38:01 PM »
it got this kvp
Code: [Select]
targetname | buyable_block
script_int | 1000
script_string | Press &&1 to buy this Blocker


its from a buyable blocker tutorial

McKay

  • Sup
  • Retired zombieX Admin
  • Elite member
  • ******
  • Posts: 1,215
Re: Scripting help
« Reply #3 on: June 27, 2012, 08:43:36 PM »
Ok so select the thing that requires those kvps in the tutorial. Press N.

A small window will appear in radiant.



On the window you can see two boxes on the bottom.

And the top one says 'key' to the left
The one underneath says 'value' to the left

The first kvp is targetname | buyable_block

So in the 'key' box type 'targetname'
In the 'value' box type 'buyable_block'

And then press enter, and the new kvp will be there, and you can see it above.

Do that for all kvps.

And if you're having trouble, i have made a prefab for the tutorial.
http://www.mediafire.com/?axvir145n7svr13
Maps made for Server:
Death Trap, Spherical, No Man's Land, Sumpf Trap, Dead City, Dead City V2, and Outlast.

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Re: Scripting help
« Reply #4 on: June 27, 2012, 08:46:56 PM »
alright i had the struggle with the targetname key and value thingy ;)
if i got more questions il ask :)

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Re: Scripting help
« Reply #5 on: June 27, 2012, 08:53:48 PM »
btw whats a prefab?

McKay

  • Sup
  • Retired zombieX Admin
  • Elite member
  • ******
  • Posts: 1,215
Re: Scripting help
« Reply #6 on: June 27, 2012, 08:55:21 PM »
It's a .map file placed in the '_prefab' folder.

You right click on radiant, and go to misc>prefabs, and select the one and it's there for you. Much easier when it comes to building maps.
Maps made for Server:
Death Trap, Spherical, No Man's Land, Sumpf Trap, Dead City, Dead City V2, and Outlast.

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Re: Scripting help
« Reply #7 on: June 27, 2012, 09:00:46 PM »
but then i see a red block, how i give it a model and change the price?

Lossy

  • Sr. Member
  • ****
  • Posts: 281
    • http://lossycreation.weebly.com
Re: Scripting help
« Reply #8 on: June 27, 2012, 09:10:37 PM »
Quote from: totarno;67835
but then i see a red block, how i give it a model and change the price?


Because you haven't picked a _prefab, so their for it leaves a red block and will cause lots of problems if not deleted.

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Re: Scripting help
« Reply #9 on: June 27, 2012, 09:12:34 PM »
but i loaded the prefab and it gafe me the red block

Zoreh

  • V.I.P.s
  • Elite member
  • *
  • Posts: 1,258
Re: Scripting help
« Reply #10 on: June 27, 2012, 09:15:10 PM »
Why don't you guys add eithoters on steam,xfire or something instread :o

Lossy

  • Sr. Member
  • ****
  • Posts: 281
    • http://lossycreation.weebly.com
Re: Scripting help
« Reply #11 on: June 27, 2012, 09:16:02 PM »
right click on 2d grid and go misc>prefab and a folder should called _prefab and pick one, it should work.

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Re: Scripting help
« Reply #12 on: June 27, 2012, 09:17:05 PM »
ok whatever, im follow the tutorial and ignore the prefab but how i connect a trigger use and a script model?

Zoreh

  • V.I.P.s
  • Elite member
  • *
  • Posts: 1,258
Re: Scripting help
« Reply #13 on: June 27, 2012, 09:18:59 PM »
select wall 1 and wall 2 and press 'w'.

The wall you selected first will be connected to the second wall.

etc trigger - wall
      scriptbush/model - player/clip

totarno

  • Full Member
  • ***
  • Posts: 148
  • Mapper
Re: Scripting help
« Reply #14 on: June 27, 2012, 09:27:53 PM »
ty but know i have to surround the script_model with player clip -.-
tellmehow please <3