Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Few questions
Re: Few questions [message #408845 is a reply to message #408824] Fri, 30 October 2009 09:22 Go to previous messageGo to previous message
Hubba is currently offline  Hubba
Messages: 40
Registered: October 2009
Karma:
Recruit
reborn wrote on Fri, 30 October 2009 04:29

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



Ok found the solution for my objects pointfix I skipped the whole script because it had really nothing to do with what i wanted. So i opened up my level edit and checked the setting for my "object". And found this cool options "Damagepoints" and "Deathpoints" so i started to mess around with the values and bingo there it is. Smile

And about question 3. Commands->Get_Model(GameObject *obj); is the right method but it ain't listed in my 'ScriptCommands' in "scripts.h". I tried to add it there but then my server wouldn't load at all. It kept opening and closing the server console screen.

And thanks for the link there is lots of interesting stuff there Smile

[Updated on: Fri, 30 October 2009 09:27]

Report message to a moderator

 
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:38:23 MST 2024

Total time taken to generate the page: 0.00949 seconds