Forum

> > Stranded II > General > Modding the hammer function?
Forums overviewStranded II overviewGeneral overviewLog in to reply

English Modding the hammer function?

4 replies
To the start Previous 1 Next To the start

old Modding the hammer function?

Satis
User Off Offline

Quote
Hi there

I have continued on the massive mod from where Builder2-0 have left it.

Curently I'm working on inplement more hammers for building stuff with, and the item creation is there no problem with.

My problem lies in the buildings......
let's say that I have 3 different hammers and for each upgraded hammer i want to unlock new buildings that I can build with that hammer.
like:
the stone hammer can only build:
Tent, Shelter and fire place.

when I upgrade the hammer for a better hammer I still will be able to build the same as the stone hammer but this one will allso be able to build more building that that.


I have been looking over and over the inf files again and again with no luck :S


Hope you can clear somthing up for me

old Re: Modding the hammer function?

bizzl
User Off Offline

Quote
you can try to lock/unlock the buildings within the on:inhand event of each hammer, e.g.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[i]//script for stone hammer[/i]
s2:on:inhand {
	s2:lockbuildings;
	s2:unlockbuilding 1;
	s2:unlockbuilding 2;
	s2:unlockbuilding 3;
}



[i]//script for next hammer[/i]
s2:on:inhand {
	s2:lockbuildings;
	s2:unlockbuilding 1;
	s2:unlockbuilding 2;
	s2:unlockbuilding 3;
	s2:unlockbuilding 4;
	s2:unlockbuilding 5;
	s2:unlockbuilding 6;
}

[i]//and so one, for each hammer in [b]it's own script area![/b][/i]

Off course this gets pretty long and complicated if you have skills and stuff, but it shouldn't be to hard to implement this there, too.

old Re: Modding the hammer function?

Satis
User Off Offline

Quote
Oh yes that would work when I look at the script and calculating i inside my head

One thing thou.
When I'm fitling with the script in my head I came acros the buildings.inf file where it unlocks buildings.
If I use that script, then it will overwrite those unlock functions in that file, unless I actualy delete the unlock functions in that file and implement it in the hammer script insted

hmmm back to work you got me hoocked up on the implementing it into the hammes...... so alot scriptine


Question to the moderator or DC:
the right click function on the hammer, is that somthing that is coded into the source code or is there a place I can have a look at that function?

old Re: Modding the hammer function?

bizzl
User Off Offline

Quote
Satis has written
the right click function on the hammer, is that somthing that is coded into the source code or is there a place I can have a look at that function?

The "Hammer" function is hardcoded into the engine.
However, you can catch it via on:attack2 and use s2 cmd skipevent if you need to block it for some reason.

old Re: Modding the hammer function?

Satis
User Off Offline

Quote
bizzl has written
Satis has written
the right click function on the hammer, is that somthing that is coded into the source code or is there a place I can have a look at that function?

The "Hammer" function is hardcoded into the engine.
However, you can catch it via on:attack2 and use s2 cmd skipevent if you need to block it for some reason.


Okay thanks for the tip
To the start Previous 1 Next To the start
Log in to replyGeneral overviewStranded II overviewForums overview