 |
DysoForums
|
| View previous topic :: View next topic :: Hide signatures |
| Author |
Message |
Pol2 Mortal
Joined: 07 May 2003 Posts: 16
Level: 2
|
Posted: Thu Jul 03, 2003 11:14 pm Post subject: HELP FIRE |
|
|
Hey can ennt one help me whit the campfire sricpt i meen were i can set it up so you need a chapfire to rest and so wood can be chapfire...
plz help |
|
| Back to top |
|
 |
Marquis Drayfox
Fri 07/04/03 4:32pm
|
This should belong in the "Worldbuilding" Forum.
*click* |
|
|
 |
Little Teapot Deity

Joined: 11 Sep 2002 Posts: 2332
Level: 39
|
Posted: Sat Jul 05, 2003 2:46 am Post subject: campfire rest tutorial |
|
|
Ok, I am doing this about 3 more times... then I'm going to go insane and help, instead of do things for people. in order to make a dysoesque campfire rest system, you need to make 4 things: 2 scripts, and item, and a placable.
The Item:
1) Make it miscellaneous thin (size/type doesn't matter, only the tag does)
2) Christen it "Firewood" for the purposes of this tutorial. give it the Unique power: Self Only (1 charge/use) "spell" ability. give it 3 (or however many times you want to be able to use it) charges.
3) make sure the tag is "firewood" for this.
The Placable:
1) Make a placable, preferably named "Campfire". do not touch the tag/resref that comes when you name the item.
2) make it plot, unless you want it to be destroyable, and if you want it to deal damage on a click, make it usable (I'm not doing that script for you in this post)
3) make it the campfire, no ambient appearance, of course, this assumes you want the normal campfire, and not an armoire.
The Scripts: Ok, so we need the item we made to make a campfire, and we want the campfire to be near when someone rests... to do that, I put this script in the OnItemUsed Event handle in Module Properties:
| Code: |
//::///////////////////////////////////////////////
//:: Name: Firewood item fired
//:: FileName: itemfirecf.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Sample script for making an item make a campfire.
*/
//:://////////////////////////////////////////////
//:: Created By: Greggus Bakus
//:: Created On: Today
//:://////////////////////////////////////////////
void main()
{
object oItem = GetItemActivated();
object oPC = GetItemActivator();
location lTarget = GetItemActivatedTargetLocation();
string sTag=GetTag(oItem);
object working;
if(GetIsObjectValid(oPC))
{
if(sTag=="Firewood")
{
working = CreateObject(OBJECT_TYPE_PLACEABLE, "campfire", lTarget);
AssignCommand(working, DelayCommand(90.0f, DestroyObject(working)));
}
}
} |
Now to make the campfire need to be around is a simple matter, with this script in the OnRest event handle:
| Code: |
void main()
{
object oPC = GetLastPCRested();
object oCampfire = GetNearestObjectByTag("Campfire", oPC);
float Distance = GetDistanceBetween(oPC, oCampfire);
if(Distance > 10.0f)
AssignCommand(oPC, ClearAllActions());
} |
it's not that hard to do... I just made this in about 30-45 minutes (tested it too ) _________________ Matthijs says:
oh ja, ik weet het zonet nog niet
Matthijs says:
het ziet er toch wel een beetje naar uit dat we nederlands praten
Matthijs says:
mischien moet ik dan maar eens vaker nederlands gaan praten
Matthijs says:
kan je me ook meteen niet op al mijn spellinsfouten wijzen
There you have it! indisputable proof Solo's a fascist!!! |
|
| Back to top |
|
 |
Pol2
Sun 07/06/03 4:29pm
|
| Hey thx BUT i thick you must have wright wrong becouse i can't find the (OnItemUsed Event handle in Module Properties) so what do i do... |
|
|
 |
Little Teapot
Sun 07/06/03 4:49pm
|
| OnActivateItem event handle... sorry... heh. |
|
|
 |
Glorin
Sun 07/06/03 9:07pm
|
| TP u rule!!!!!!! |
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB 2.0.2 © 2001, 2002 phpBB Group
|