Set string CVar

Moderator: GZDoom Developers

Post Reply
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Set string CVar

Post by Nash »

The latest mod-friendly CVar additions are awesome (thanks Randi!) but I was wondering if we could have an ACS function that sets the string of a CVar, since it's possible to define a string CVar in CVARINFO? :3
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Set string CVar

Post by randi »

Added in r4292. You might also be interested in r4293.
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Set string CVar

Post by Nash »

Yay thanks! <3
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Set string CVar

Post by randi »

Is r4295 also of interest to you?
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Set string CVar

Post by Nash »

YES YES YES YES :DDDDDDDDDDDDD

It's a pretty huge change though so further testing is needed... but it's for the best and I'm sure modders will really welcome this change. If I run into anything I'll report it ASAP!
Spoiler:
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Set string CVar

Post by Ed the Bat »

Does this mean Get functions for more string-based properties will be on the horizon? That would be cause for celebration in my book. :3:
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Set string CVar

Post by randi »

Maybe?
User avatar
Jimmy
 
 
Posts: 4728
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: Set string CVar

Post by Jimmy »

Dynamic strings? Really? REALLY? :o

This is unexpected but awesome. I'm trying to think of what could possibly be done with it, and I suppose I should forum-search "dynamic strings" to take a look at what they've been desired for. What other new things could they theoretically be used for? :D
User avatar
Nash
 
 
Posts: 17505
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Set string CVar

Post by Nash »

I guess http://zdoom.org/wiki/CheckActorProperty should be considered deprecated from now on... ?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Set string CVar

Post by Graf Zahl »

Why? For actually checking a string value it's still a lot better than the Get* method.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: Set string CVar

Post by randi »

To expand on that answer, GetActorProperty has to first check if a string exists in the string table and add it if it doesn't before you even get a chance to compare it against something else. CheckActorProperty can just compare them directly without any of that extra work.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”