Frontcannon
Senior Member
Posts: 538
Threads: 10
Joined: Jul 2010
Reputation:
2
|
RE: Scripts Recollection
void OnStart()
{
AddUseItemCallback("", "R01_Key1", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "R01_Key2", "mansion_2", "KeyOnDoor2", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}
╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
|
|
10-25-2010, 05:37 PM |
|
Everlone
Member
Posts: 178
Threads: 11
Joined: Oct 2010
Reputation:
2
|
RE: Scripts Recollection
great I was so close to it big thx to you
|
|
10-25-2010, 05:48 PM |
|
zlandael
Junior Member
Posts: 29
Threads: 1
Joined: Sep 2010
Reputation:
0
|
RE: Scripts Recollection
Good job guys!
|
|
10-27-2010, 01:07 AM |
|
mastersmith98
Junior Member
Posts: 21
Threads: 3
Joined: Oct 2010
Reputation:
0
|
RE: Scripts Recollection
Maybe we should create a page on the wiki with all of these examples? It would be a place for someone to post script examples that aren't quite tutorials.
EDIT: wow sorry about that, I'm totally out of it. I didn't realize I already said this a few posts ago, my bad.
|
|
10-27-2010, 01:55 AM |
|
anzki
Member
Posts: 88
Threads: 6
Joined: Apr 2010
Reputation:
1
|
RE: Scripts Recollection
Add message:
1.Make category to language file with any name you want to! Let's say category named:"Example". (To easily add this use HPLangtool found in the same folder as the level editor.)
2.Inside the category ("Example", or anything you have put it's name.) create entry with any name you want. Example; "Entry1".
3.Use this script where you want the message to be showed:
SetMessage(string &asTextCategory, string &asTextEntry, float afTime);
- string &asTextCategory and string &asTextEntry will be the name of a category and entry.
- float afTime will be the time the message is on screen in form; 1.0f(=1 second.)
Example using category "Example" and entry "Entry1", showing the entry for 20 seconds:
SetMessage("Example", "Entry1", 20.0f);
|
|
10-27-2010, 02:32 PM |
|
Arvaga
Junior Member
Posts: 8
Threads: 1
Joined: Oct 2010
Reputation:
1
|
RE: Scripts Recollection
BUMP.
I added how to make a lever functional.
C'mon don't let this thread die =P.
|
|
11-11-2010, 05:29 PM |
|
Frontcannon
Senior Member
Posts: 538
Threads: 10
Joined: Jul 2010
Reputation:
2
|
RE: Scripts Recollection
I've been map-building for the past weeks, but now the scripting start's again!
I think you'll have plenty material soon enough
╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
|
|
11-11-2010, 06:05 PM |
|
Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
|
RE: Scripts Recollection
Could someone post a script on how to make a basic puzzle? For example I'd like to know how to write that puzzle in the storage map where you need to clear the rubble with the explosive . I tried looking at the dev scripts but they make no sense to me
|
|
01-03-2011, 03:33 PM |
|
Frontcannon
Senior Member
Posts: 538
Threads: 10
Joined: Jul 2010
Reputation:
2
|
RE: Scripts Recollection
The explosive puzzle is far from being 'basic'. If you don't understand anything what you're reading, it's just going to be frustrating to try scripting your own. It involves CombineItemCallbacks in a special Inventory.hps which so far nobody here seems to understand, lots of custom particle effects and animations to make it look real etc etc...
The most basic puzzle would be a locked door and a key item, try to look and that and built from its code.
╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
|
|
01-03-2011, 04:20 PM |
|
Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
|
RE: Scripts Recollection
Quote:The explosive puzzle is far from being 'basic'. If you don't understand anything what you're reading, it's just going to be frustrating to try scripting your own. It involves CombineItemCallbacks in a special Inventory.hps which so far nobody here seems to understand, lots of custom particle effects and animations to make it look real etc etc...
The most basic puzzle would be a locked door and a key item, try to look and that and built from its code.
I already have working locked doors in my map with key items, I just want to add some more advanced puzzles to my map so it's not so bland as "Find key, next area, find another key, escape". Any ideas?
(This post was last modified: 01-03-2011, 04:25 PM by Equil.)
|
|
01-03-2011, 04:25 PM |
|
|