Posts: 4
Threads: 1
Joined: Aug 2010
Hello modders!
I am making a drowning script, but I don't know how to get the script to detect if player is underwater. Nor do I know how to damage a player. (I know how to set the timing.) Can someone tell me (if anyone knows?)
Thanks,
The Maxassin
Posts: 890
Threads: 16
Joined: Jun 2010
You need to modify the source for that.
Posts: 4
Threads: 1
Joined: Aug 2010
(03 Aug 10, 06:24PM)Mael Wrote: You need to modify the source for that.
Are you sure? I was going to make a script in the config folder.
Posts: 2,841
Threads: 44
Joined: Jun 2010
There's no such thing as forcing a player with a script to damage him or for the game to detect if a player is underwater so you would have; like Mael said, to modify the source.
Posts: 4
Threads: 1
Joined: Aug 2010
Oh, ok. How do I do that??? Is it possible?
Posts: 3,780
Threads: 33
Joined: Jun 2010
/suicide
Yes, it is possible to modify the source code to do what you're asking about.
Keep in mind that modified code must not be played on public servers.
1) Learn C++
2) Find the parts of the source code (probably clientgame.cpp or one of the visual files) that deal with the player being underwater.
3) Use your ingenuity, the existing code, and your C++ skills to think of how you'd make a CubeScript variable (probably just a read-only VAR) that describes whether the player is underwater.
4) Profit! Not really though, that'd violate license.
Posts: 638
Threads: 10
Joined: Jun 2010
Maxassin, things like what you are intending to do are vital parts of a game's gameplay and I am quite certain there's no game on earth, which provides such strong script-commands to perform things like you're asking for. In other words, drowning is not part of AC's gameplay and generating such gameplay-feature by script would be nonsense, because everyone useing that script would only put himself into disadvantage...
Changing source code is pretty much the equivalent for 'make your own game'. To be honest, just forget about this idea, it won't lead nowhere and you'll only wasting your time trying to get something working.
Posts: 3,462
Threads: 72
Joined: Jun 2010
Also remember, that I believe that you can not use the textures/art/mapmodels without the authors permission. I've seen that thrown around somewhere, it seems like flowtron is the person to ask.
Posts: 3,780
Threads: 33
Joined: Jun 2010
MakkE more likely.
Or DrakkE.
Posts: 1,438
Threads: 54
Joined: Jun 2010
(04 Aug 10, 12:01AM)DES|V-Man Wrote: DrakkE.
Thats WIN.
Posts: 3,462
Threads: 72
Joined: Jun 2010
Yeah, I just seem to remember flowtron warning people about the restrictions on modding. MakkE is the artist though. He made many of the textures, and other stuff visual.
Posts: 4
Threads: 1
Joined: Aug 2010
Oh, ok. I'll probably scrap it then. I'm not so good at C++ anyway, I just knew the sleep command, the suicide command, and how to name the script. Maybe I'll bug the creator(s) about it. Thanks for all the help!
Posts: 3,462
Threads: 72
Joined: Jun 2010
Haha, I doubt they will like you bugging them!
Posts: 638
Threads: 10
Joined: Jun 2010