Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Few questions
Re: Few questions [message #408824 is a reply to message #408816] Fri, 30 October 2009 03:29 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
Hubba wrote on Fri, 30 October 2009 00:10


Hey! I'm back again with new questions and I need your help Smile

1) How can i change how much score an object give? Lets say the object i kill gives 200 score and I want it to 100. I know i could attach "jfw_give_points_on_death" to like -100. But then if you damage the object so it only have 1 hp left you would still get 199 score.
Or another example if you shot a stank with a ramjet you will get like 30 scores each shot. How could i decrease that?



There's a difference between setting the damage points, and setting the kill points. But both are possible...
Take a look at the script you just mentioned. You know that kinda does what you want, so look at that scripts code, and surely you will find the function you are looking for inside that script. A little bit of lateral thinking will get you quite far in this API.

Hubba wrote on Fri, 30 October 2009 00:10


2) How can i get check how much hp/armor and what weapons a player have? If i want the char to turn into another preset but keep the hp/armor + weapons? Example: If I have a !roshambo command.



Commands->Get_Health (GameObject *obj);
Commands->Set_Health (GameObject *obj);

There is also some functions for getting weapons too, however I forget what they are. Look in engine_weapons or something like that I think.
It's something like 'Get_Current_Weapon', if you search int he API for that, then you'll find all the other weapon engine calls.

You can then grant power up's to the new character you change them to... 'Grant_Powerup'


Hubba wrote on Fri, 30 October 2009 00:10


3) How can i get a models name? Is this possible? Is there a Get_Model_Name() method?

Thanks
Hubba



Commands->Get_Model(GameObject *obj); // I think...




This site is out of date, but is probably still a bit useful for someone starting out.
http://www.renegadewiki.com/index.php?title=API



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CnC Reborn : Jumpjet Animation Test
Next Topic: PimPen Harvy
Goto Forum:
  


Current Time: Sun Dec 15 11:45:00 MST 2024

Total time taken to generate the page: 0.00876 seconds